A "total system collapse" caused widespread power cuts across Nigeria on Thursday.
Early in the morning, levels of power generated in Africa's most populous country fell to zero megawatts.
Connections were gradually restored throughout the day.
Grid power supplies are often erratic in Nigeria, located in the west of Africa, despite its role as a major oil and gas producer.
Thursday's was the most serious outage for a year - the West African country's grid collapsed at least four times in 2022, which the authorities blamed on technical problems.
A number of electricity distribution companies told customers on X, the social media platform formally known as Twitter, that the most recent blackouts were a result of a "total system collapse".
Power Minister Adebayo Adelabu said a transmission line connecting two power plants in Niger state suffered an explosion after a fire, thus tripping the grid.
"The fire has been fully arrested and over half of the connections are now up and the rest will be fully restored in no time," Mr Adelabu said in a statement in the afternoon.
Less than 50% of Nigeria's population has access to a regular power supply. Most homes and businesses have resorted to generators, inverters and other sources of electricity so as not to be dependent on the national grid.
However, many of these now come at a higher cost following the government's removal of fuel subsidies last May.
The theoretical maximum amount of power Nigeria could produce is 12,500MW, but the country normally produces just a quarter of that, the Reuters news agency reports.
On Thursday, at around 10:30 local time (09:30 GMT), power levels had risen from zero to 273MW, which was still well below the daily average of 4,100MW, data from the Transmission Company of Nigeria showed.
President Bola Tinubu, who has been in office for just over 100 days, has promised to improve supply by allowing state governments to build their own power plants.