BUENOS AIRES, Argentina — A massive blackout left more than 44 million people without electricity in Argentina and Uruguay on Sunday after an unexplained failure in the neighboring countries' interconnected power grid.

Authorities worked frantically throughout the day to restore power and said that by Sunday night, power had been restored to 90 percent of Argentine customers. In Uruguay, officials said they expected most of the country of 3 million people to have light back soon.

Voters cast ballots by the light of cellphones in gubernatorial elections in Argentina. Public transportation halted, shops closed and patients dependent on home medical equipment were urged to go to hospitals with generators.

"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, 24, of Buenos Aires. "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."

Uruguay's energy company, UTE, blamed the collapse on a "flaw in the Argentine network," which it said cut power to all of Uruguay for hours. The Argentine energy company Edesur said the failure originated at an electricity transmission point between the power stations in Yacyretá and Salto Grande on the Argentine coast.

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.

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 in recent history.

"I've never seen something like this," said Silvio Ubermann, a taxi driver in Buenos Aires. "Never such a large blackout in the whole country."

A vendor waits for customers during a blackout in Buenos Aires, Argentina, on Sunday. Agustin Marcarian / Reuters

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 soccer tournament Sunday evening.

Since taking office, Argentine President Mauricio Macri has said 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 revenue lost to years of mismanagement of the electricity sector.

According to the Argentine Institute for Social Development, an average family in Argentina still pays one-20th what similar households pay for electricity in neighboring countries.

The subsidies were a key part of the electricity policy of President Néstor Kirchner's 2003-07 administration and the presidency of Kirchner's wife and successor, Cristina Fernández, in 2007-15. Fernandez is running for vice president in October elections.