It was only a few months ago that Haider Abadi, Iraq’s avuncular prime minister, seemed to do no wrong.

He had been credited with defeating Islamic State, among other accomplishments, and was expected to easily net a second term in parliamentary elections in May. He had the backing of the U.S. and others in the West. He looked to be Iraq’s first genuinely post-sectarian leader.

Yet today, he stands largely alone. His party has unraveled, his popularity has tanked and his political partners are abandoning him for alliances with groups loyal to Iran. That he is still prime minister is largely a measure of his opponents’ failure so far to agree on a governing coalition.

At his weekly news conference Thursday, he all but acknowledged that his days as prime minister are numbered, saying he “would not cling to power.”

Abadi’s looming downfall speaks to the wrath of a growing force in Iraqi politics: an electorate more concerned with the performance of its leaders than their sectarian or ethnic affiliations.

For weeks, Iraq has been roiled by protests in Basra, a city in the country’s south, which provides most of its oil but whose residents have neither electricity nor clean water to counter summer temperatures reaching 120 degrees.

Nabil al Jurani / Associated Press

Security forces deploy around the provincial government building during a demonstration demanding better public services and jobs in Basra, 275 miles south of Baghdad, on Sept. 12, 2018.

Security forces deploy around the provincial government building during a demonstration demanding better public services and jobs in Basra, 275 miles south of Baghdad, on Sept. 12, 2018. (Nabil al Jurani / Associated Press)

The demonstrations, sparked after thousands had been hospitalized because of water contamination, turned violent.

Security forces killed at least 12 people, while rioters burned down any governmental, militia and party building they could find. The Iranian Consulate met the same fate. (Protesters gathered around the U.S. Consulate as well before security forces cordoned it off.)

The protests delivered what many believe was the fatal blow to Abadi’s bid for the premiership. But his problems had begun earlier.

Little was expected from Abadi, a one-time engineer who lived in Britain before returning to Iraq after the 2003 U.S. invasion, when he was picked from the back ranks of the ruling Dawa Party to dislodge Nouri Maliki in 2014.

Arguably, his greatest advantage was that he wasn’t Maliki, a Shiite Muslim supremacist who had frustrated so many that even Grand Ayatollah Ali Sistani, a Shiite cleric who is considered to be Iraq’s highest religious authority, broke his proscription against meddling in political affairs and asked him to step aside.

But Abadi, who is also Shiite, performed well: He oversaw a turnaround of the country’s crippled armed forces, keeping a fragile anti-Islamic State coalition of local, regional and international rivals together long enough to beat back and then rout the jihadis who, at their peak, had marauded to within an hour’s drive of Baghdad. Later, he quelled an independence bid by Iraqi Kurds.

As parliamentary elections approached in May, he reached across the sectarian divide to assemble his Victory bloc, made up of elites from all groups in the country.

But some of the goodwill toward him had evaporated. He was a reluctant politician, and claimed to hate the politicking that was an integral part of governing Iraq.

Repeated attempts to fight corruption, jump-start the economy and reduce the public sector failed.

Though he was widely expected to win in May, he came in third, behind a coalition led by Shiite cleric and populist leader Muqtada Sadr, and the Fatah list, a political bloc staffed by leaders of pro-Iranian paramilitary factions.

It was apathy that felled him, many said.

A sobering 56% of eligible voters, many of them fed up with almost comical levels of corruption in successive governments and not driven by sectarian loyalties, didn’t bother to go to the polls.

Many of those who did bother had been mobilized by Sadr or Hadi Ameri, the fervently anti-U.S. militiaman-turned-politician who led the Fatah bloc.

Abadi tried to recover. He engaged in the customary horse-trading that follows parliamentary elections, with different parties splintering and forming coalitions to achieve a majority in the 329-seat parliament.

By partnering with Sadr, Abadi could still snatch a second term.

But in the wake of the Basra protests, Sadr-affiliated members of parliament called for Abadi’s resignation. And just as he had intervened in 2014, Sistani last week issued a statement saying he would not support the incoming prime minister if he was chosen “from politicians who have been in power in the previous years.”

Some observers saw Iran’s hand behind Abadi’s sidelining, considering him a pro-U.S. figure, especially after he had agreed to abide by the sanctions Washington imposed last month on Iran.

But Iran had not won either, said Renad Mansour, an Iraq expert at the London-based Chatham House think tank.

“The U.S.’s number one choice was Abadi and that didn’t work out. Iran’s number one choice was a coalition that would include Maliki and [Hadi] Ameri, and that also didn’t work out,” Mansour said.

In a change from the past, the election didn’t turn on identity politics, Mansour added.

In Iraq’s sectarian allocations, the president must be a Kurd, the speaker of parliament a Sunni and the prime minister a Shiite.

“The system reinforces these identities, but for some time people have been saying this doesn’t matter. They’re saying give us water that’s clean, electricity and jobs,” he said.

For Ahmad Basheer, an Iraqi journalist and comedian who hosts the popular “Basheer Show,” the protests in Basra were a wholesale rejection of what he described as Iraq’s “political matrix.”

“The protests were rejecting all politicians,” he said. “It didn’t matter if they were Sunni, Shiite, Kurd, or if they were protected because of their religion or creed.”

There had been protests in Iraq every summer, Basheer pointed out, but he considered the ones in Basra as the “final chance” for politicians to improve.

“People won’t have mercy anymore with politicians,” said Basheer, adding that this year’s protests would be the last to end without wider bloodshed.

“If the politicians don’t improve by next year and truly serve people, it will be a disaster,” he said.

CAPTION

Los Angeles Dodgers manager Dave Roberts, commissioner Rob Manfred, and San Diego Padres general manager A.J. Preller comment on the reports that Manny Machado signed with the Padres.

Los Angeles Dodgers manager Dave Roberts, commissioner Rob Manfred, and San Diego Padres general manager A.J. Preller comment on the reports that Manny Machado signed with the Padres.

CAPTION

Los Angeles Dodgers manager Dave Roberts, commissioner Rob Manfred, and San Diego Padres general manager A.J. Preller comment on the reports that Manny Machado signed with the Padres.

Los Angeles Dodgers manager Dave Roberts, commissioner Rob Manfred, and San Diego Padres general manager A.J. Preller comment on the reports that Manny Machado signed with the Padres.

CAPTION

Jay Cohen, Santa Anita's bugler, was recently diagnosed with Bell's Palsy and has had to take a leave of absence from his job at the track.

Jay Cohen, Santa Anita's bugler, was recently diagnosed with Bell's Palsy and has had to take a leave of absence from his job at the track.