Officials did not directly link the accident on Saturday to war damage, although Ukraine's power grid has suffered from the accumulated impact of Russian airstrikes, leading to severe restrictions on electricity supplies in recent weeks.
President Volodymyr Zelenskiy blamed ice buildup on power lines and ruled out a cyberattack.
"In the morning, a technological accident occurred on the power grid: two lines between Romania and Moldova and within the territory of Ukraine stopped operating," he said in his nightly video address.
"The causes are being thoroughly investigated."
Ukraine had increased power imports to meet demand, he said.
Ukrainian Energy Minister Denys Shmyhal said the two incidents occurred within a minute of each other, "leading to a cascade of shutdowns in seven regions of the country".
Moldova's Energy Ministry said the disruption there was triggered by problems in Ukraine's grid that led to a voltage drop on the line connecting Romania and Moldova.
The system is under greater pressure as forecast night-time temperatures of minus 13C in Kyiv are due to sink to minus 22 C on Monday.
Zelenskiy said nearly 3500 apartment buildings lack heating in the capital.
"The city and utilities and energy experts are promising to fix the heating situation by tomorrow morning," he said.
"But the pace should be faster."
Russia agreed to halt strikes on energy infrastructure until Sunday at the request of US President Donald Trump. Kyiv said it would reciprocate, and the countries did not report major attacks.
Regions in both Ukraine and Moldova were affected after the malfunction at 10:42am Kyiv time. Officials in both countries said power was restored later in the day following efforts to stabilise interconnected grids.
The metro in Kyiv suspended operations and water supplies in the city were cut temporarily.
The state emergency service said its teams led 500 stranded passengers out of metro stations. Some passengers were seen waiting at a station with dimmed lights in anticipation of electricity being restored.
Traffic lights and some public transport in Chisinau were not working, according to the city's mayor, and most districts did not have electricity.
The accident caused a shutdown on Ukraine's side, triggering automatic protection at substations and the temporary disconnection of nuclear power plant units from the grid, Shmyhal said.
with Reuters