UPDATE 2-Iraq's Maliki wins at least 94 parliament seats in national election
* Maliki's allies triumphant, shoot celebratory gunfire
* Main Shiite rivals face uphill battle
* Sunnis defeatist
* Kurds are playing close hand (adds quotes, details)
By Ahmed Rasheed and Isra' al-Rube'ii
BAGHDAD, May 19 (Reuters) - Prime Minister Nouri Maliki won the largest share of Iraqi parliamentary seats in last month's national elections, dealing a blow to Shi'ite, Sunni and Kurdish rivals who opposed his serving a third term.
Preliminary results on Monday showed Maliki won at least 94 seats, far more than his two main Shi'ite rivals, the movement of Muqtada Sadr, which picked up 28 seats, and the Islamic Supreme Council of Iraq (ISCI), which won 29 seats.
The size of Maliki's victory, with 1,074,000 votes for his list in Baghdad alone, will make it much harder for any of his opponents to argue he is not the choice of the country's Shi'ite majority.
It is particularly important to him because his government is fighting a war with armed Sunni groups, including the Islamic State of Iraq and the Levant (ISIL), which holds territory in Syria and holds sway around central Iraq.
His supporters' celebratory gunfire was heard in central Baghdad late Monday afternoon.
Maliki picked up 92 seats on his formal State of Law blocs, and another two seats through minority candidates affiliated with him who ran their own campaigns.
Kurds gained a total of 62 parliament seats, while Sunnis won at least 33 seats between their two main coalitions. A secular bloc, headed by former prime minister Iyad Allawi, took 21 seats.
Final results are expected in the coming weeks after the electoral commission rules on complaints of voter fraud and irregularities. The federal court then certifies the results.
"Maliki's position is strong," said former national security adviser, Muwafak al Rubaie, a candidate on Maliki's political slate, who emphasised the prime minister's experience as commander in chief.
"Because of Syria and regional polarisation, security will be very important for the next four years."
Maliki will now start a period of bargaining to see if he can bring on board his Shi'ite rivals, who have rejected his candidacy.
The government is formed as a package deal with the 328-member parliament approving the president by a two-thirds majority. He then asks the prime minister to form his cabinet. It could take anywhere from three months to the end of the year, one member of Maliki's list said.
If a two-thirds majority cannot be reached, political parties argue that the parliament could approve the president by a simple majority, ending any effort to block a new government from being formed.
Maliki's critics accuse him of leading the country to ruin. They say that four more years will turn the government into a despotic regime and risk Iraq's breakup.
They fault him for his prosecution of his war on ISIL in western Anbar province that has raged for five months, displaced over 420,000 Sunnis and failed to put a dent in violence around the country.
ISCI and the Sadrists have made clear they want a prime minister chosen from within the Shi'ite majority - what they refer to as the National Alliance.
In the weeks since the April 30 election, as news leaked of Maliki's anticipated victory margin, ISCI and the Sadrists' best hope appeared to be pressuring the prime minister to choose a successor from his State of Law coalition.
But Monday's results make it highly unlikely Maliki will feel any need to step aside. Smaller Shi'ite parties, whom ISCI and the Sadrists sought to woo are already lining up behind the prime minister.
"The will of the voter imposes a certain reality on the ground," said Ammar Tuma, a leader of the Fadila (Virtue) party, which picked up six seats. "We have to respect the will of the people."
Maliki's Sunni and Kurdish rivals, who have indicated their readiness to stand with ISCI and the Sadrists against Maliki, are unsure if their potential Shi'ite allies will buckle.
"Things will change when negotiations begin," said one current Sunni lawmaker, speaking on condition of anonymity. "The National Alliance will choose him."
If ISCI and the Sadrists choose to break from their Shi'ite political partners, it is far from certain they could cobble together a ruling coalition with Sunnis and Kurds, who remain a fragmented opposition.
Despite a strained relationship, the Kurds are far from committed to pushing Maliki out. The president of the Kurdistan Regional Government, Masoud Barzani, criticised Maliki while speaking to Reuters last week, but cautioned the Kurds would wait to see the electoral results.
Barzani has stressed the Kurds would want as the price of their participation in any government iron-clad guarantees on the passage of a national oil law, a timeframe for resolving the status of disputed territories in northern Iraq, and a resolution to budget disputes.
Barzani has threatened the Kurds could boycott the national government and parliament if their demands are not met.
In private, some Kurdish officials say they are willing to accept Maliki for another four years, if it buys them time to advance their long-term dream of an independent Kurdistan. (Reporting by Ned Parker, Editing by Angus MacSwan)