Andrew Neather, a speechwriter who worked in Downing Street for Tony Blair and in the Home Office for Jack Straw and David Blunkett, said Labour's relaxation of controls was a deliberate plan to "open up the UK to mass migration".

As well as bringing in hundreds of thousands more migrants to plug labour market gaps, there was also a "driving political purpose" behind immigration policy, he said.

Ministers hoped to radically change the country and by doing so "rub the Right's nose in diversity", added Mr Neather, but senior Labour figures remained reluctant to discuss the policy in case it alienated the party’s "core working class vote".

Critics said the revelations showed a "conspiracy" within Government to impose mass immigration for "cynical" political reasons.

During his Thursday night appearance on Question Time, Mr Straw was repeatedly quizzed about whether Labour's immigration policies had left the door open for the BNP.

Writing in the Evening Standard, Mr Neather revealed the "major shift" in immigration policy came after the publication of a policy paper from the Performance and Innovation Unit, a Downing Street think tank based in the Cabinet Office.

The published version promoted the labour market case for immigration but Mr Neather said unpublished versions contained additional reasons.

He wrote: "Earlier drafts I saw also included a driving political purpose: that mass immigration was the way that the Government was going to make the UK truly multicultural.

"I remember coming away from some discussions with the clear sense that the policy was intended - even if this wasn't its main purpose - to rub the Right's nose in diversity and render their arguments out of date."

The "deliberate policy", from late 2000 until "at least February last year", when the new points based system was introduced, was to open up the UK to mass migration, he said.

In the article, Mr Neather defended the policy, saying mass immigration has "enriched" Britain, and made London a more attractive and cosmopolitan place.

But he acknowledged that "nervous" ministers made no mention of the policy for fear of alienating Labour voters.

"Part by accident, part by design, the Government had created its longed-for immigration boom.

"But ministers wouldn't talk about it. In part they probably realised the conservatism of their core voters: while ministers might have been passionately in favour of a more diverse society, it wasn't necessarily a debate they wanted to have in working men's clubs in Sheffield or Sunderland."

Sir Andrew Green, chairman of the Migrationwatch think tank, said: "Now at least the truth is out, and it's dynamite.

"Many have long suspected that mass immigration under Labour was not just a cock up but also a conspiracy. They were right.

"This Government has admitted three million immigrants for cynical political reasons concealed by dodgy economic camouflage."

The chairmen of the cross-party Group for Balanced Migration, MPs Frank Field and Nicholas Soames, said: "We welcome this statement by an ex-adviser, which the whole country knows to be true.

"It is the first beam of truth that has officially been shone on the immigration issue in Britain."