Turkish company Karpowership has restored power to Guinea-Bissau's capital after cutting off supplies over an unpaid bill of $15m (£12m).
The company resumed operations late on Wednesday after receiving a payment of $6m from the government.
Bissau had been plunged into darkness for nearly two days, with hospitals affected and radio stations off-air.
The country is one of the poorest in the world and has been beset by instability since independence.
In 2019, its government signed a deal with Karpowership, one of the world's biggest floating power plant operators, to supply the country with all its power.
A spokesperson for the company told the OceanNewsUK that Karpowership was "grateful" for Guinea-Bissau's efforts to pay the bill, which made it possible to resume electricity supplies.
"Following a protracted period of non-payment, our fuel suppliers were no longer able to withstand the delay and had no option but to pause work," the spokesperson added.
Energy Minister Isuf Baldé confirmed that $6m of the $15m bill had been settled.
"In a small and poor country like Guinea-Bissau, carrying out a transfer operation of this level, $10m, takes time," he said.
He added that the contract with Karpowership needed to be renegotiated because costs had almost doubled since it came into effect, making it unaffordable.
Power was cut in Bissau, a city with a population of more than 400,000, in the early hours of Tuesday.
Some public hospitals used generators to carry out surgery, local journalist Assana Sambu told the OceanNewsUK.
But they did not have running water because there was not enough electricity, and hospital directors appealed for power in order to cook food for their patients.
Another journalist, Alberto Dabo, said he resorted to drinking water from a well because water supplies had been cut amid the sweltering heat which reaches 40C.
Media outlets were also affected by the power cut, with state-run Rádio Nacional among those that stopped broadcasting,
Guinea-Bissau has one of the lowest electricity connection rates in Africa, estimated at 10% nationally and 20% in the city of Bissau, according to the African Development Bank.
Power outages in Bissau are frequent, with some parts of the city going without power for more than four hours a day.
The World Bank said in 2020 that Guinea-Bissau's "electricity sector has been trapped in a downward spiral for decades" due to political instability, poor management, lack of planning and "vested interests".
Karpowership supplies electricity to six other African countries - Ghana, The Gambia, Ivory Coast, Mozambique, Senegal and Sierra Leone.
The Turkish company has also signed a deal with South Africa, saying it will cover more than 5% of the country's electricity needs.
But it has taken a tough line over non-payment. Last month, it cut power to Sierra Leone's capital, Freetown, over an unpaid bill of $40m.
Although access to electricity has increased in sub-Saharan Africa in recent years, it still remains low, with more than 50% of the region's population having no grid connection, according to the United Nations Conference on Trade and Development (Unctad).