RIO DE JANEIRO (AP) -- Heavy rain, lightning and strong winds caused blackouts that left nearly a third of Brazilians - 60 million people - in the dark, officials said Wednesday as they scrambled to restore confidence in the country's infrastructure before soccer's 2014 World Cup and the 2016 Olympics.
The weather made transformers on a vital high-voltage transmission line short-circuit, Brazil's energy minister said. Two other transmission lines also went down as part of an automatic safety mechanism.
"The problem was exclusively with the transmission lines," Energy Minister Edison Lobao said.
The blackout cut electricity to 18 of Brazil's 26 states and left them without power for up to four hours Tuesday night. The federal district that includes the national capital of Brasilia was spared. About 7 million people also lost water service in Sao Paulo. All of Paraguay briefly lost power.
The massive Itaipu dam on the border with Paraguay - the world's second-largest hydroelectric power producer - was completely shut down for the first time in its 25-year history.
In Brazil's largest cities of Rio and Sao Paulo, people were trapped in elevators, stranded on commuter trains or stuck in sweltering apartments during unusually hot spring temperatures that have hit the 90s.
"I wonder how this could have happened and am worried about what it does to Brazil's image, especially with the World Cup and Olympics coming up," said Wesley Aragao, a 24-year-old sailor who waited out the blackout at his parents' house in northern Rio. "Nobody likes to be left in the dark."
The Brazilian Olympic Committee would not comment on Tuesday's blackout, but among the guarantees made to the International Olympic Committee is that Rio will be isolated from the nation's power system exactly to avoid problems like this. The city will have its own direct energy feed during the games.
Analysts said the blackout shows Brazil's lack of investment in the power system at a time when Latin America's largest economy is booming.
President Luiz Inacio Lula da Silva defended his government from criticism that it has not done enough to improve the power grid since he took office in 2003, two years after Brazil suffered shortages and rationing under his predecessor.
"In seven years, we created 30 percent of all the transmission lines built in the last 130 years," Silva said Wednesday. "There was no shortage of power generation, and the problem was not a lack of transmission lines."
Lobao said Silva's government has invested about $13 billion in the transmission lines, and another $4.7 billion in transformers since 2003.
The energy minister also defended the strength of the Brazilian system - pointing out that it took a day to fully restore power after a blackout hit the East Coast of the U.S. and Canada in 2003, leaving 50 million people in the dark. He mentioned lengthier in blackouts other nations, including Italy and Japan.
It was at least the fourth time since 1985 that Brazil has suffered a massive power outage blamed on transmission line failures from Itaipu, the world's second-largest dam behind China's Three Gorges.
The worst of the Brazilian blackouts occurred in 1999 after lightning struck a power substation in Sao Paulo state, plunging 97 million Brazilians into darkness for up to five hours.
After severe energy shortages and rationing in 2001, Brazil diversified its energy supply. It has seen blackouts since, but none like Tuesday's failure, in which the power outage was more geographically widespread. Analysts say the scope of the blackout was so large because the nation's power grid has become more interconnected, meaning a glitch in one part can affect a wider area.
"There is an absolute failure of infrastructure in terms of energy," said Patrizia Tomasi, an engineer with the Brazilian energy consultancy firm Planck E. "What we are seeing now is only the beginning. There is a need to invest more, to improve how energy is managed by those in the government. We have Itaipu, which is huge, which is great, but there are no lines to transmit all that energy."
Jorge Miguel Samek, the head of Itaipu Binacional, said there was no lack of energy. "The problem was with lightning or a storm that took down some towers," he said.
Energy from Itaipu travels along five high-capacity transmission lines strung up on 2,000 towers each to two substations about 560 miles (900 kilometers) east in Sao Paulo state, according to Itaipu's Web site. From those substations, the energy enters Brazil's national grid and heads to four main regions, the most populous areas of Brazil.
If a transmission line heading to the substations is damaged, a safety mechanism will begin to shut down the power generators at Itaipu, which is what happened Tuesday night, Samek said.
All of which was little solace for those who encountered sudden darkness.
Chaotic traffic in Rio turned even worse, hospitals rushed to find emergency generators to keep intensive care units and emergency rooms operating, and people stayed indoors because of worries about a potential outbreak of violence following intense drug gang wars.
In the city of Bauru in Sao Paulo state, the blackout caused a panic in a neonatal care unit that was without generators.
Five of six babies were quickly transferred to another hospital before a visiting television crew lent the hospital the generator it was carrying. Light from the camera was the only available source in the unit for hours.
The blackouts came late at night when most people were already safely at home. There were no increases in crime in Rio, and Sao Paulo saw a drop in the number of incidents, police said.