BAGHDAD — Iraq’s political leaders announced late Tuesday that they had agreed on the need to keep American military trainers in Iraq next year, but they declared that any remaining troops should not be granted immunity from Iraqi law, a point the United States has said would be a deal breaker.

The statement, issued as the political leaders emerged from a meeting in the presidential compound, sent mixed signals as United States officials and the Iraqi cabinet negotiate whether any troops will remain after the first of the year, when the forces are scheduled to depart. American officials were scrambling on Tuesday night to decipher the announcement.

Less than three months before the last troops are scheduled to leave — close to 40,000 members of the military are in the country — Americans are increasingly frustrated at the slow pace of the discussions. The United States has called for a prompt decision, noting the logistical hurdles of moving ahead on a withdrawal while making contingency plans to leave some troops behind.

The meeting of Iraq’s political leadership, which concluded around 10 p.m., was attended by Prime Minister Nuri Kamal al-Maliki; President Jalal Talabani; Mr. Maliki’s chief rival, Ayad Allawi; and several other high-ranking officials. Ali al-Dabbagh, the government spokesman, issued a statement saying the leaders had agreed that there was “no need to grant immunity to trainers,” rather ambiguous phrasing for a deal-breaking demand.