WASHINGTON  The Bush administration and the government of Prime Minister Nuri Kamal al-Maliki on Friday appeared to be on the verge of an agreement that would spell out the conditions under which American troops would remain in Iraq and a timeline for their eventual departure.

Simultaneous activity in Washington and Baghdad signalled that an accord was near on a security arrangement, formally called a status of forces agreement, to govern the conduct of American forces in Iraq for the remainder of their time there.

Aides to leading members of Congress were being briefed at the White House, while Mr. Maliki was briefing his council on national security in Baghdad. Moreover, a news briefing has been scheduled for Saturday in Baghdad, a sign that the executive branches of the United States and Iraq have ironed out their differences on an eventual American withdrawal.

“So we are getting closer to having this agreement worked out,” President Bush’s spokeswoman, Dana Perino, said at a Friday news briefing. “So we anticipate being able to hopefully have something soon. But I will stress to you, it’s not finalized yet.”