BAGHDAD – Iraqis’ tempers are rising with their thermometers over their government’s failure to provide reliable electricity. And their thermometers have topped 120 degrees.

Billions of dollars have been spent trying to fix the grid since the 2003 invasion, but many Iraqis still get less than six hours of electricity per day — about the same or sometimes even less than they received under Saddam Hussein.

Fears that frustration could lead to bloodshed were realized Saturday in the hot and humid southern oil port of Basra, where two protesters were killed after a demonstration over power outages turned violent, prompting security forces to open fire.

The crisis has already led to the electricity minister’s resignation and poses a major test for Prime Minister Nouri al-Maliki as he struggles to keep his job amid bickering over the formation of a new government more than three months after national elections.

It also complicates efforts to stabilize the country as the U.S. military prepares to withdraw its forces by the end of next year.

“The current government has had four years to build and rehabilitate the power stations, but apparently the officials did not nothing but make false promises,” said Ali Sami, a Baghdad taxi driver who had to take his baby to the doctor for a heat rash last week. “It is clear that billions of dollars were spent on nothing in this country.”

Sami said his household has been averaging only about an hour a day of city electricity, compared with about 10 hours per day last summer. He pays about $100 per month to tap into the neighborhood generator, which provides enough energy to keep the lights on and run some appliances, but the family has spent many sleepless nights on the rooftop.

Even hospital patients have been sleeping outside in Basra, though those who are not mobile must endure the sweltering night indoors.

Riyadh Abdul-Wahid, the head of Basra Health Directorate, said the hospitals had been connected to an emergency line that kept power running but officials were forced to take them off line last week. The facilities have generators, but only enough to keep the lights and medical machines running.

Al-Maliki dispatched a delegation to Basra and urged Iraqis to be patient.

“You should not expect to solve the power crisis soon. It will take two years at least,” he said Tuesday at a press conference. “We will give priority to the electricity sector in the next government.”

Al-Maliki’s State of Law list has joined forces with a hard-line Shiite religious party in a bid to gain control of the parliament after the Sunni-backed Iraqiya list won the most seats in the election. But the factions remain divided over who should be prime minister and hold other posts in the next government.

Iraqis have suffered from power shortages for decades as the infrastructure suffered from neglect brought on by wars and U.N. trade sanctions under Saddam.

Most of the country received an estimated four to eight hours of power per day under Saddam, though Baghdad residents got 16 to 24 hours per day. There is no such favoritism toward the capital under the current rationing system.

The ex-U.S. occupation chief L. Paul Bremer promised to restore electricity shortly after the invasion, saying in August 2004 that “every day that the Iraqis do not get power, do not get water, do not get sewage treatment is a day when their quality of life is such that they’re less inclined to view us as liberators.”

But efforts quickly stalled as the insurgency gained steam and militants began targeting power pylons and other infrastructure, making it nearly impossible for maintenance and new projects to be launched.

“Everything that was thrown at the problem between 2003 and early 2007 was wasted money because whatever was built was blown up,” said Samuel Ciszuk, a regional energy analyst with IHS Global Insight.

Since then the rebuilding effort has faced other setbacks, including a drop in oil prices that forced budget cuts and a change in the government’s focus to revenue-boosting projects such as improving the oil industry. Demand for power, meanwhile, has swelled with the proliferation of construction projects and consumer appliances.

Many Iraqis spend more than $50 per month to tap into neighborhood generators to extend their power, leaving a mass of cables and wires crisscrossing streets. Impoverished Iraqis who can’t afford the extra fee are forced to pilfer electricity or suffer without fans or air conditioners.

But patience is running thin this year with a heat wave in the south, anger over the political deadlock and failure of the government to deliver after years of promises.

The government also raised electricity prices last year.