The government's chief legal advisor informed then British prime minister Tony Blair in 2002 that deposing Saddam Hussein would contravene international law, a newspaper reported on Sunday.
Britain's then Attorney General Lord Peter Goldsmith arrives at 10 Downing Street in London in 2006.
Peter Goldsmith, the Attorney General at the time, wrote to Blair eight months before the 2003 US-led invasion of Iraq, but the premier ignored the advice, the Mail on Sunday claimed.
The newspaper said a public inquiry into Britain's involvement in the war was in possession of Goldsmith's letter and he and Blair are likely to be questioned about it when they give evidence next year.
The inquiry heard in its first week that Britain's ambassador to the United Nations at the time, Jeremy Greenstock, believed the invasion was "of questionable legitimacy".
The Mail on Sunday reported that Goldsmith was "gagged" after he tried to dissuade Blair from lending Britain's support to the war.
Goldsmith wrote the letter six days after a Cabinet meeting on July 23, 2002, at which ministers were secretly told that the United States and Britain were set on "regime change" in Iraq, the report said.
Goldsmith, who attended the meeting, strongly disagreed and on July 29, he wrote to Blair -- a close friend of his -- on a single sheet of headed notepaper.
In the letter, Goldsmith pointed out that war could not be justified purely on the grounds of "regime change", the newspaper reported.
He explained that although UN rules permitted "military intervention on the basis of self-defence", they did not apply in the case of Iraq because Britain was not under threat from Saddam's regime.
Goldsmith ended his letter by saying "the situation might change" -- although in legal terms, it never did, the Mail on Sunday said.
An unnamed friend of Goldsmith told the newspaper that Blair went "beserk" when he received the letter because it undermined his case for war.
The friend said Goldsmith was subjected to such pressure by Blair's close inner circle over his advice that he threatened to resign and lost weight.
"He is an honourable man and it was a terribly stressful experience," the friend said.
Goldsmith eventually gave qualified legal backing to the conflict days before the war started in March 2003 in a brief, carefully drafted statement.
The inquiry, Britain's third related to the conflict, is looking at its role in Iraq between 2001 and 2009, when nearly all its troops withdrew.
The committee, chaired by retired civil servant John Chilcot, will report by the end of 2010.