US Defense Secretary Robert Gates has arrived in Baghdad to meet with Iraq's high ranking officials during an unannounced visit to the war-torn country.

The Pentagon chief arrived in Baghdad on Wednesday. He is scheduled to meet with President Jalal Talabani and Prime Minister Nouri al-Maliki.

Gates is also expected to travel to northern Iraq for talks with President of the autonomous Kurdish region Massoud Barzani.

On the possiblity of further extending the presence of nearly 50,000 US troops still in Iraq, a senior US military official said Gates did not rule that out, but added that the request must come from the Iraqi side.

"The ball is in their court," Gates said. "It would probably be in their interest to ask for it sooner rather than later because we're starting to run out of months."

Meanwhile, the senior US military official also asserted that he supported the completion of "the government formation process" by Iraqi officials "to get security ministries dealth with."

The coalitions headed by rival Iyad Allawi and Maliki came first and second in Iraq's parliamentary elections last March.

The country was thrown into a political turmoil for some time as neither side secured the absolute majority required to form a government.

Unity government talks, however, concluded late last year, reinstating the Premier and the President.