BAGHDAD – A secular challenger to Iraq’s prime minister edged ahead Saturday in the overall vote count in parliamentary elections, while the prime minister held onto his province-by-province lead as the counting neared completion.

The March 7 elections will determine who will lead Iraq as American troops depart and the country is left to grapple with the sectarian divisions laid bare by the U.S.-led invasion seven years ago.

Former Prime Minister Ayad Allawi’s political alliance was leading by 7,970 votes nationwide, according to a tally of 92 percent of the almost 12 million ballots cast. Prime Minister Nouri al-Maliki’s coalition was leading in seven provinces compared with five for Allawi’s bloc.

It was unclear whether Allawi’s slim lead would hold or whether it would mean more parliament seats for his Iraqiya bloc. Under Iraq’s election system, parliamentary seats are apportioned by how well coalitions do in each province, not by the overall vote count.

Allawi, who led the country from 2004 to 2005, has cast himself as the man who can bridge the country’s sectarian divisions. His anti-Iran rhetoric has attracted a number of Sunni – and even Shiite – voters worried about the growing influence of their Shiite-majority neighbor on Iraq’s Shiite-led government.

Saturday’s results mark the second time Allawi’s Iraqiya coalition, made up of Sunni and Shiite candidates, has edged ahead of al-Maliki’s State of Law coalition in the lengthy tallying of votes.

The results also included a fourth of the ballots cast by Iraqis living abroad, who are believed to back Allawi. Full preliminary results could come within days but final results could take weeks, pending appeals by political groups.

Allawi, a secular Shiite, has drawn on significant Sunni support in areas such as Diyala and Ninevah provinces to boost his election chances, while al-Maliki’s coalition has fared well in the Shiite south and Baghdad, which accounts for almost a fifth of the seats in parliament.

The Iraqi National Alliance, a coalition of Shiite religious parties tied to Iran, is leading in three provinces in the southern Shiite heartland. The Kurdish Alliance, as expected, was ahead in the three provinces that make up the Kurdish autonomous region in the country’s north.

With no single coalition expected to win an outright majority in parliament, the tight vote heralds extended political negotiations to form a new government.