London: Former British prime minister Tony Blair was warned that the invasion of Iraq would be illegal in a secret memo from Attorney General Lord Goldsmith three months before the war began, a media report said.

The British Cabinet Office has published the first draft of Goldsmith`s legal advice which confirmed he had doubts about the legality of the conflict without a new UN mandate, express.co.uk reported.

The memo, written on January 14, 2003, refers to the UN`s previous resolution saying that it "does not revive the authorisation to use force... in the absence of a further decision of the Security Council".

However, within days of giving this advice, Goldsmith flew to the US for a meeting with former president George W Bush`s advisers, who changed his mind.

"We had trouble with your attorney. We got him there eventually," John Bellinger, former White House legal counsel told British colleagues later, the report said.

Goldsmith, however, termed this report as "nonsense" but admitted he had serious reservations about the war.

He gave the go-ahead, after which the armed forces joined the US-led invasion March 20.

Several British government lawyers have told the Iraq Inquiry they believed the invasion was unlawful.

The Iraq Inquiry, chaired by Sir John Chilcot, is a public inquiry into the role of Britain`s role in the 2003 invasion of Iraq. The inquiry was announced on June 15, 2009 by then prime minister Gordon Brown.