(CNN) -- An important hydroelectric dam shared by Brazil and Paraguay failed Tuesday night, pushing a large swath of central and southern Brazil into darkness, said the country's minister of mines and energy, Edison Lobao.
At about 10:30 p.m. (7:30 p.m. ET), the Itaipu dam shut down completely, Lobao said in a radio interview.
Power began to slowly return Tuesday night, and authorities expected a restoration of power overnight, Lobao said.
An official at Brazil's National Electric System Operator told CNN that the incident at Itaipu caused an outage of 18,000 megawatts. The official declined to be named because he was not authorized to talk to the media.
The outage was approximately equivalent to the amount of energy needed to power the state of Sao Paulo and its 20 million residents, the official said.
"Everything's fine," the official said, adding that as Itaipu rebooted, it would repower the affected regions.
Millions of people were affected by the blackout in six Brazilian states that included the cities of Rio de Janeiro and Sao Paulo. The capital, Brasilia, was unaffected, CNN en Español reported.
Neighboring Paraguay and Uruguay also reported related blackouts, Lobao said.
Rio's main streets and avenues were in a total blackout. Video footage showed long lines of cars at a near standstill on the roads, and the subway system in Rio came to a stop.
Itaipu provides more than 20 percent of Brazil's energy.