– Iraqi leaders must decide “within weeks” whether they want American troops to stay beyond a year-end deadline for their withdrawal, the top U.S. military official said Friday during a visit to Baghdad.

“Time is running short,” said Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, who warned that in coming weeks the military must make “irrevocable” logistics and operational decisions about whether to stay or go.

“There is what I call a physics problem,” Mullen said. “With 47,000 troops here and lots of equipment, physically it just takes time to move them.”

Mullen’s message comes two weeks after Defense Secretary Robert M. Gates told Iraqi Prime Minister Nouri al-Maliki that some U.S. troops would stay if the Iraqi government requested, an overture that House Speaker John A. Boehner (R-Ohio) seemed to reinforce during his visit to Baghdad last week.

Under a three-year-old agreement between the two countries, all U.S. troops must leave Iraq by Dec. 31. President Obama, who campaigned on a pledge to get troops out of the country, has not sought an extension of the agreement. But amid mounting turmoil across the Mideast and concern that extremists will try to destabilize Iraq after U.S. forces leave, American military officials have in recent weeks honed a message that if Iraq wants troops to stay, the United States would listen.

Mullen’s short timetable for a response increases pressure on Maliki. Since Gates’s visit it has become clear that inviting the U.S. military to stay could be politically perilous for the prime minister.

Firebrand Shiite cleric Moqtada al-Sadr warned that he would reconstitute his Mahdi Army militia if the Iraqi government allows U.S. forces to stay. Other Shiite extremist groups tied to Iran also said they would join in a campaign against the government and any Americans who remain in the country.

Rival politicians who pledged just months ago to work together with Maliki in a unity government — and who have historically been aligned more closely with U.S. interests — have also shown little interest in stepping out in favor of an extended American troop presence.

After meeting with Mullen on Thursday, a stern-faced Maliki appeared with the U.S. commander on state-run television. Later, Maliki released a statement on his Web site saying Iraqi military and security forces have become “able to take the responsibility” for the country’s security.

Still, Iraqis have not viewed Maliki’s statements as unequivocal. And even as he pushed a deadline, Mullen sought to give Maliki breathing room, saying there has been “a lot of interest and some confusion” about the status of any agreement on keeping U.S. troops in the country.

“There are no plans — nor has there been any request from the Iraqi government — for any residual U.S. force presence here after this December,” Mullen said.

Yet, planning is underway for at least hundreds of U.S. military trainers and advisers to remain in the country under the auspices of a security office within the U.S. Embassy. Some U.S. officials say there are scenarios under which thousands of military advisers could fall in that category, though it is unclear whether the U.S. military would agree to such plans without a new agreement giving officers immunity to operate in the country and allowing them to respond with force, if needed.

Some military analysts in Washington have begun to view 10,000 to 12,000 troops as a useful long-term presence in Iraq.

Iraq will have no fighter jets and limited ability to secure its borders by 2012.

Mullen said a decision is needed soon because the pace of removing equipment and troops will peak late this summer.

One military official, who spoke on the condition of anonymity to freely discuss the issue, said that if the request came as “late as October,” the United States would probably find a way to accommodate it. Replacement units of troops are scheduled to arrive in Iraq for tours as late as September. Although those missions are described as mostly providing security for departing troops, they could be expanded and extended.