The UK plans to withdraw its 4,100 troops by the end of July 2009
The refusal of the Iraqi parliament to pass a draft law allowing UK troops to remain beyond 2008 is "a minor hiccup", the defence secretary has said.
John Hutton said he was confident a deal would be reached before Britain's UN mandate expired on 31 December.
He told Sky News it would be "very serious" if a bill was not agreed, but there were "contingency plans" in place in case should that happen.
Gordon Brown has given a deadline of 31 July for all UK troops to leave Iraq.
The draft legislation would apply to all 6,000 non-US troops who are due to stay in Iraq into 2009. As well as Britain, these include forces from Australia, El Salvador, Estonia and Romania.
On Saturday, Baghdad's council of representatives rejected the bill by 80 votes to 68.
Some members were concerned that its terms were not as strict as a pact governing US forces agreed earlier this month.
Others, loyal to the radical Muslim cleric Moqtada al-Sadr, want UK troops to leave Iraq when the mandate expires.
The bill will now be sent back to the Iraqi cabinet for amendment and another vote is due next week.
Asked what would happen if no agreement was in place by the New Year, Mr Hutton said: "That would be a very serious situation and obviously we couldn't let it happen, but I don't think it will happen.
"[Iraqi] Prime Minister [Nouri] Maliki has made it very clear to Gordon Brown and very clear to me that he wants UK forces to continue in a role into the New Year and beyond.
"I think this is a minor hiccup."
The defence secretary would not give details of exactly how Britain would react if the deadlock was not broken, but said: "We have contingency plans.
"The safety of our guys out there is our top priority. There will have to be an agreement, a proper agreement, before our guys are out on the streets."
Last week, Mr Brown said British military operations in Iraq would end by 31 May and the remaining 4,100 service personnel would leave within two months.
Several hundred trainers will remain, some working with the Iraqi navy.
Shadow defence secretary Liam Fox said an agreement was "essential".
"It is reported that Iraq's parliament will vote again next week," he said. "Gordon Brown must ensure that - if that vote is not successful - alternative arrangements are ready to be put in place by 31 December to give our forces the legal protection they need.
"The government will need to explain how those arrangements will operate, provide reassurance that they can be put in place in time and that they will provide equivalent legal protection to that which is being offered to US forces."
Meanwhile, the former head of the Army, Gen Sir Mike Jackson, has accused the US government of making "appalling decisions" following the Iraq invasion.
Speaking to the Sunday Telegraph, he criticised the decision to disband Iraq's security forces and remove all members of Saddam Hussein's Baath party from public office.
"These decisions may well have doubled the time it has taken to get to where we are now," he added.