(Adds Iraq speaker of parliament comment)
* Visit comes after militant gains on the border
* Iran say U.S. trying to regain control of Iraq
* Kerry wants to forge an inclusive government
* Sunni parliament speaker says political change needed
By Lesley Wroughton and Ahmed Rasheed
BAGHDAD, June 23 (Reuters) - U.S. Secretary of State John Kerry met Iraq's prime minister in Baghdad on Monday to push for more inclusive leadership, as Nuri al-Maliki's forces abandoned the border with Jordan, leaving the entire Western frontier beyond government control.
Sunni tribes took the Turaibil desert border crossing, the only legal crossing point between Iraq and Jordan, after Iraqi security forces fled, Iraqi and Jordanian security sources said.
Tribal leaders were negotiating to hand the post to Sunni Islamists from the Islamic State in Iraq and the Levant (ISIL) who took two main crossings with Syria in recent days and have pushed the Shi'ite-led government's forces back toward Baghdad.
Ethnic Kurdish forces control a third border post with Syria in the north, leaving government troops with no presence along the entire 800-km (500-mile) western frontier which includes some of the most important trade routes in the Middle East.
For the insurgents, capturing the frontier is a dramatic step towards the goal of erasing the modern border altogether and building a caliphate across swathes of Syria and Iraq.
Washington, which withdrew its troops from Iraq in 2011 after an occupation that followed the 2003 invasion which toppled dictator Saddam Hussein, has been struggling to help Maliki's administration contain a Sunni insurgency led by ISIL, an al Qaeda offshoot which seized northern cities this month.
U.S. President Barack Obama agreed last week to send up to 300 special forces troops as advisers, but has held off from providing air strikes and ruled out redeploying ground troops.
But Washington has also been sympathetic to complaints from many Sunnis, who dominated Iraq under Saddam, that Maliki has pursued a sectarian Shi'ite agenda, excluding them from power.
One of the most important Sunni leaders active in Baghdad politics, speaker of parliament Osama al-Nujaifi, agreed with Kerry that a twin-track approach was needed to defeat the threat from ISIL: "We have to confront it through direct military operations and through political reform," he told Kerry.
PRESSURE ON MALIKI
Washington is worried that Maliki and fellow Shi'ites who have won U.S.-backed elections have worsened the insurgency by alienating moderate Sunnis who once fought al Qaeda but have now joined the ISIL revolt. While Washington has been careful not to say publicly it wants Maliki to step aside, Iraqi officials say such a message was delivered behind the scenes.
There was little small talk when Kerry met Maliki, the two men seated in chairs in a room with other officials. At one point Kerry looked at an Iraqi official and said, "How are you?"
The meeting lasted one hour and 40 minutes, after which Kerry was escorted to his car by Iraq's Foreign Minister Hoshiyar Zebari. As Kerry got in, he said: "That was good."
Iran's Supreme Leader Ayatollah Ali Khamenei on Sunday accused Washington of trying to regain control of the country it once occupied - a charge Kerry denied.
Iraqis are due to form a new government after an election in April. Maliki's list won the most seats in parliament but would still require allies to win a majority.
Kerry said on Sunday the United States would not choose who rules in Baghdad, but added that Washington had noted the dissatisfaction among Kurds, Sunnis and some Shi'ites with Maliki's leadership. He emphasised that the United States wanted Iraqis to "find a leadership that was prepared to be inclusive and share power".
Senior Iraqi politicians, including at least one member of Maliki's own ruling list, have told Reuters that the message that Washington would be open to Maliki leaving power has been delivered in diplomatic language to Iraqi leaders.
Recent meetings between Maliki and American officials have been described as tense. According to a Western diplomat briefed on the conversations by someone attending the meetings, U.S. diplomats have informed Maliki he should accept leaving if he cannot gather a majority in parliament for a third term. U.S. officials have contested that such a message was delivered.
A close ally of Maliki has described him as having grown bitter toward the Americans in recent days over their failure to provide strong military support.
Jordanian army sources said Jordan's troops had been put in a state of alert in recent days along the 181-km (112-mile) border with Iraq, redeploying in some areas as part of steps to ward off "any potential or perceived security threats".
The Jordan border post was in the hands of Sunni tribesmen. An Iraqi tribal figure said there was a chance it would soon be passed to control of the militants, who seized the nearby crossing to Syria on the Damascus-Baghdad highway on Sunday.
He said he was mediating with ISIL in a "bid to spare blood and make things safer for the employees of the crossing. We are receiving positive messages from the militants."
The need to battle the Sunni insurgency has put the United States on the same side as its enemy of 35 years, Iran, which has close ties to the Shi'ite parties that came to power in Baghdad after U.S. forces toppled Saddam.
However, Iran's Supreme Leader Khamenei made clear on Sunday that a rapprochement would not be easy.
"We are strongly opposed to U.S. and other intervention in Iraq," IRNA news agency quoted Khamenei as saying. "We don't approve of it as we believe the Iraqi government, nation and religious authorities are capable of ending the sedition."
Some Iraqi observers in Baghdad interpreted Khamenei's comments as a warning to the United States to stay out of the process of selecting any successor to Maliki.
Baghdad is Kerry's third stop in a tour of Middle East capitals to emphasise the threat the insurgency poses to the region and call on Iraq's allies to use their influence to press Baghdad to govern more inclusively. He has also been warning Iraq's neighbours they need to step up efforts to cut off cross-border funding to the militants. (Additional by Suleiman al-Khalidi in Amman; Writing by Oliver Holmes; Editing by Peter Graff and Alastair Macdonald)