BUENOS AIRES, Argentina — A massive blackout left tens of millions of people without electricity in Argentina, Uruguay and Paraguay on Sunday in what the Argentine president called an "unprecedented" failure in the countries' power grid.
Authorities were working frantically to restore power, and by the evening electricity had returned to 98 percent of Argentina, according to state news agency Telam. Power also had been restored to most of Uruguay's 3 million people as well as to people in neighboring Paraguay.
On Sunday morning, Argentine voters were forced to cast ballots by the light of cellphones in gubernatorial elections. Public transportation was halted, shops closed and patients dependent on home medical equipment were urged to go to hospitals with generators.
"This is an unprecedented case that will be investigated thoroughly," Argentine President Mauricio Macri said on Twitter.
Argentina's power grid is generally known for being in a state of disrepair, with substations and cables that were insufficiently upgraded as power rates remained largely frozen for years.
The country's energy secretary said the blackout occurred at about 7 a.m. local time when a key Argentine interconnection system collapsed. By mid-afternoon nearly half of Argentina's 44 million people were still in the dark.
The Argentine energy company Edesur said on Twitter that the failure originated at an electricity transmission point between the power stations at the country's Yacyretá dam and Salto Grande in the country's northeast.
But why it occurred was still unknown.
An Argentine independent energy expert said that systemic operational and design errors played a role in the power grid's collapse.
"A localized failure like the one that occurred should be isolated by the same system," said Raúl Bertero, president of the Center for the Study of Energy Regulatory Activity in Argentina. "The problem is known and technology and studies (exist) to avoid it."
Energy Secretary Gustavo Lopetegui said workers were working to restore electricity nationwide by the end of the day.
"This is an extraordinary event that should have never happened," he told a news conference. "It's very serious."
Uruguay's energy company UTE said the failure in the Argentine system cut power to all of Uruguay for hours and blamed the collapse on a "flaw in the Argentine network."
In Paraguay, power in rural communities in the south, near the border with Argentina and Uruguay, was also cut. The country's National Energy Administration said service was restored by afternoon by redirecting energy from the Itaipu hydroelectric plant the country shares with neighboring Brazil.
In Argentina, only the southernmost province of Tierra del Fuego was unaffected by the outage because it is not connected to the main power grid.
Brazilian and Chilean officials said their countries had not been affected.
Many residents of Argentina and Uruguay said the size of the outage was unprecedented.
"I was just on my way to eat with a friend, but we had to cancel everything. There's no subway, nothing is working," said Lucas Acosta, a 24-year-old Buenos Aires resident. "What's worse, today is Father's Day. I've just talked to a neighbor and he told me his sons won't be able to meet him."
"I've never seen something like this," said Silvio Ubermann, a taxi driver in the Argentine capital. "Never such a large blackout in the whole country."
Several Argentine provinces had elections for governor on Sunday, which proceeded with voters using their phone screens and built-in flashlights to illuminate their ballots.
"This is the biggest blackout in history, I don't remember anything like this in Uruguay," said Valentina Giménez, a resident of the capital, Montevideo. She said her biggest concern was that electricity be restored in time to watch the national team play in the Copa America football tournament Sunday evening.
Since taking office, Argentine President Macri has said that gradual austerity measures were needed to revive the country's struggling economy. He has cut red tape and tried to reduce the government's budget deficit by ordering job cuts and reducing utility subsidies, which he maintained was necessary to recuperate lost revenue due to years-long mismanagement of the electricity sector.
According to the Argentine Institute for Social Development, an average family in Argentina still pays 20 times less for electricity than similar households in neighboring countries.
The subsidies were a key part of the electricity policy of President Néstor Kirchner's 2003-2007 administration and the presidency of Kirchner's wife and successor, Cristina Fernández in 2007-2015. Fernandez is now running for vice president in October elections.
Associated Press writers Patricia Luna in Santiago, Chile, and Natalie Schachar in Mexico City contributed to this report.