MPs have rejected the Tories' call for an inquiry into the war in Iraq.
British troops have been in Iraq since 2003
Shadow foreign secretary William Hague had told MPs ministers had "no adequate reason" to block an inquiry into the war's build-up and immediate aftermath.
But the Commons rejected the call by 288 to 253, although the government's majority was nearly halved at 35.
Foreign Secretary Margaret Beckett said the issues would be explored "in the round" eventually, but not while UK troops were still in action in Iraq.
She echoed sentiments expressed earlier by prime minister-in-waiting Gordon Brown, who agreed lessons had to be learned, but rejected an immediate inquiry.
She said: "At this critical juncture, when Iraq's future clearly hangs in the balance, it would be wrong, plain and simply wrong, for us to divert our focus from the tasks that need completing now and once again turn our gaze backwards to what has happened in the past.
"It is our responsibility to the people of Iraq, which should receive our complete focus and attention in the critical months ahead."
But Mr Hague said the motion was about the principle of holding an inquiry, rather than demanding one now.
He told the House of Commons: "No adequate reason remains for the government to refuse to establish such an inquiry to begin its work in the near future."
Mr Hague argued for an inquiry along the lines of that held into the Falklands War, a wide-ranging probe chaired by philosopher Oliver Franks.
The Tories wanted an inquiry to be conducted by a committee of senior politicians of all parties - with the power to summon other politicians, officials and military personnel.
Mr Hague earlier told BBC Radio 4 that there had been inquiries and robust debate on things that had not gone well while both world wars were in progress.
He also said that it was important not to wait too long as memories of what happened in 2003 could fade and e-mails could disappear.
But Mr Brown, who is in Baghdad, told the BBC: "We have got a duty to our troops and I think people would think that, to divert our energies into another way of looking at this issue at this time, would not be the right thing to do."
However he said more could be done to reassure the public about intelligence and to keep its analysis independent of politics.
He has also asked Sir Gus O'Donnell, the head of the civil service, to make sure that if intelligence is put in the public domain in future, it has been properly verified and validated.
An amendment to the Tory motion, put forward by Tony Blair, "recognises that there have already been four separate independent committees of inquiry into military action in Iraq; further recognises the importance of learning all possible lessons from military action in Iraq and its aftermath".
It goes on to say that the Commons "declines at this time, whilst the whole effort of the government and the armed forces is directed towards improving the condition of Iraq, to make a proposal for a further inquiry which would divert attention from this vital task".
In the second vote of the debate, MPs backed Mr Blair's amendment 274 to 229 - a government majority of 45.
Opposition parties, as well as human rights groups and anti-war campaigners, have been calling for an inquiry into the Iraq war for several years.
They say the inquiries - such as into the death of Dr David Kelly - referred to by ministers have been too narrowly focused and without sufficient independence and power to ensure the lessons of the decision to go to war, and its aftermath can be clearly learned.
In November 2006, the Scottish National Party and Plaid Cymru tabled a motion for an immediate inquiry. But MPs rejected the move after a vote.