Taiwan suffered a massive power blackout on Tuesday evening that hit businesses and residential homes, affecting close to 7 million households on the heavily industrialized island amid sweltering heat.

The outage left millions of homes without power and hit offices and factories on the island of nearly 24 million people, but appeared to have a limited impact on businesses, which include some of the world's leading technology manufacturers.

Power had been fully restored across the island by Wednesday.

The power outage was caused by a human technical error at state-owned gas supplier CPC Corp. that affected the operations of a state-owned Taiwan Power Co. power plant in northwestern Taoyuan, the two companies said at a press conference on Tuesday evening.

Taiwan Power Co.'s outage at its Taoyuan plant caused six generators to stop working, resulting in a massive blackout across Taiwan, the company said.

Residents complained as temperatures hovered around 32 degrees Celsius (90 Fahrenheit), while the blackout caused havoc as restaurants and small businesses were left without power, traffic lights stopped working and elevators stalled.

President Tsai Ing-wen apologized on her Facebook page for the blackout, describing electricity supply as a national security issue.

Relevant government departments needed to quickly explain why a single event could cause such large damage across the country's electricity system, she said. "We must reform the system. I will make this an important point for thorough inspection reforms in the future."

Minister of Economics Affairs Chih-Kung Lee offered to resign over the incident, which was accepted by Premier Lin Chuan, the government said.

Lee's formal resignation letter was expected later this week, it said. If Lee steps down as expected, he will do so just over a year after assuming office.

The blackout was the country's most severe since the 1999 Jiji earthquake, Taiwan Power Co. said.