Iraq’s incumbent Prime Minister Haider al-Abadi was hoping the country’s recent defeat of ISIS would be enough to secure his grip on power for another term. But frustration over Iran’s increasing influence in the country — and accusations of widespread political corruption — ultimately sunk his reelection bid.

He was unseated by a coalition led by Muqtada al-Sadr, an anti-American Shia cleric who once oversaw uprisings against U.S. troops. Al-Sadr’s coalition ran on a fiercely nationalist campaign that promised to crack down on corruption and disentangle Iraq from decades of foreign influence, specifically from the U.S. and Iran.

But al-Sadr's newly empowered coalition will face the same pressing test that plagued his predecessor: securing and stabilizing the country months after ISIS’s defeat. The diminished terror group isn’t going to make it easy. ISIS continues to threaten civilians, most recently releasing an audio message, declaring all who voted to be infidels and promising to carry out attacks on polling day.

Despite using a new electronic voting system for the first time, the electoral commission continued the traditional habit of marking a voter's finger with ink to prevent them from casting a ballot more than once. (Phil Pendlebury/VICE News)

Six people were killed when ISIS hit a security checkpoint in Kirkuk province on Saturday, and four were injured during ISIS mortar attacks on two voting centers in Diyala province.

The violence seemingly had an impact on voter turnout, which reached only 45 percent — the lowest since the first democratic elections were held in 2003.

In Mosul — once the epicenter of the group’s caliphate in Iraq — officials confront ISIS’s lingering presence every single day.

There was a heavy security presence at polling stations across the country - like this one in central Baghdad. (Phil Pendlebury/VICE News)

Major Mezhir Sadoon heads the Sommer police station in the east of the city. The war against ISIS i over, but in Mosul soldiers and police officers are still battling to remove the last remnants of the group.

"All death sentences must be carried out," he told VICE News. "If crimes go unpunished, it will happen again. There must be a strong deterrent against these crimes."

Security forces are dealing with ISIS suspects in the harshest of terms. But human rights groups claim that due process isn’t being implemented, leaving the country open to miscarriages of justice.

It’s estimated that there are around 19,000 suspected terrorists held in police cells like Major Mezhir’s and in prisons around Iraq, and another 24,000 are on a wanted list. But Major Mezhir is confident that the judicial process for ISIS suspects is fair, "No court gives a sentence in one hour. There is no such a thing here. They are a disease that must be eradicated. The should get cruel sentences. We should have no mercy. Or else they will dare come back."

VICE News visited the eastern half of Mosul to see how the city was coping with the lingering ISIS threat amid Iraq’s high stakes election season.