NAJAF, Iraq — Iraqis on Saturday voted in their first national election since the Islamic State’s collapse, determining the political leanings of the country’s next government in a region increasingly marked by fierce rivalries.
Nearly 7,000 candidates, representing a slew of political blocs, were running for 329 seats in Iraq’s Parliament and for the upper hand in electing the nation’s next prime minister and president.
Prime Minister Haider al-Abadi’s stiffest competition came from candidates with ties to Iran, setting up the possibility that Tehran could increase its clout in Iraq at a time when the United States and Saudi Arabia are attempting to isolate it.
Over the past four years, Abadi has tried to strike a balance between Iran and US interests in his country, while fostering political and economic ties with the Saudi monarchy.
Saturday’s vote — the fourth since the 2003 US invasion that toppled Saddam Hussein — was marked by reports of low turnout and irregularities, the Associated Press reported.
Results are expected by Monday, according to the independent body that oversees Iraq’s election, but negotiations to choose a prime minister tasked with forming a government are expected to drag on for months.
None of the candidates are expected to win an outright majority and will probably have to enter coalitions to have enough votes to elect a prime minister.
Last week, Iraqi politicians said they were concerned that the Trump administration’s cancellation of the Iran nuclear deal could push Iran to impose itself more forcefully in Iraq.
But in Iraq’s polling places, voters said their primary concerns were local. They spoke of needing jobs, security, and an opportunity to experience long stretches of stability without the spasms of violence and sectarian hatred that they have endured for 15 years.
‘‘We are looking for services and security and most importantly job opportunities for all us young people,’’ said Zaid Sahib, 25. ‘‘We are the priority.’’
Early Saturday, Abadi’s office released photos of him being patted down by a security officer outside a polling place in his home district in Baghdad, smiling broadly before heading inside to vote.
It was a striking contrast with his opponents and other members of Iraq’s political elite who voted in the swank al-Rashid Hotel inside Baghdad’s heavily guarded Green Zone. Abadi’s office has repeatedly sought to portray the prime minister as an Iraqi everyman who eschews the traditional elitist trappings of power.
His main opponents included his predecessor, Nouri al-Maliki, and Hadi al-Ameri, the head of one of Iraq’s most powerful Shi’ite militias, whose popularity soared for his role in fighting the Islamic State. Both Maliki and Ameri are closer to Iran than Abadi and have criticized the incumbent prime minister for his pro-US stances.
Iraq’s next leader faces challenges stemming from the ruinous occupation of the Islamic State and the nearly four-year war to expel the militant group.
More than 2 million Iraqis remain displaced from cities overwhelmingly damaged by the fighting. Some of them have been prevented from returning to their homes by a community that has branded them Islamic State sympathizers, effectively creating a pariah class of people with nowhere to turn.
Iraq’s government has estimated that it needs $80 billion dollars to restore the cities damaged by the combat and has relied heavily on donations from the international community to raise the funds.
Iraq’s coffers have been drained by a combination of wartime spending and oil-prices that fell dramatically over the past three years.
Many of the candidates in Saturday’s elections have said they will work to make Iraq’s economy less dependent on oil revenue while encouraging foreign investment and supporting the growth of a private sector to remedy high unemployment. All that will be underpinned by a systematic effort to eradicate the pervasive corruption that has plagued Iraq’s public sector.
The result of Saturday’s vote will likely play a role in whether US forces maintain a presence in Iraq. Abadi strongly supports keeping US troops to advise and train Iraq’s military and police while his opponents say they want to significantly reduce and regulate the activities of those forces.
This year’s election has been characterized by mixed feelings over the prospects of change.
Candidates eschewed traditional sectarian political rhetoric for a more conciliatory message of nationalism and inclusivity.

