A record 582,000 people came to live in the UK from elsewhere in the world in 2004, according to government experts.
By Dominic Casciani
BBC News community affairs
Figures from the Office for National Statistics show that 223,000 more people came into the UK than left in 2004, the highest figure recorded.
The number of people leaving the UK reached 360,000 in 2004, a figure confirming a recent trend.
Separate figures predict the population may increase by up to 7.2m in 25 years, more than half the rise from migration.
The latest figures for migration are based on official estimates of the number of people leaving or entering the UK for at least a year. The figures do not indicate whether someone stays permanently.
According to the estimates, the number of people who came to live in the UK in 2004 was about 72,000 more than in 2003.
Of the 582,000 who arrived, about 494,000 were not British citizens - a record number. The remaining 88,000 were British citizens returning from living abroad.
MIGRATION; NET INFLOWS
The most significant rise was in Eastern Europeans, people who gained the right to work in Britain as their nations joined the European Union in May 2004.
Officials estimate 52,600 workers from the 10 new EU countries came to Britain for at least a year in 2004.
These workers are thought to represent about 40% of the increase in immigration - excluding returning British citizen - over those 12 months.
The two EU nations sending the most workers to the UK are thought to be Poland and Lithuania, although statisticians say it is too early to reach firm conclusions on how EU expansion is affecting either migration to Britain or the originating nations.
The year also saw a record net inflow of people from all parts of the Commonwealth.
About 41,000 more people from "Old Commonwealth" nations - South Africa, Canada, Australia and New Zealand - came to live in the UK than left.
And about 123,000 more people from the "New Commonwealth" nations - former colonies in Africa, Caribbean and Asia - came than left.
In both categories there was a small increase in people leaving the UK, presumably returning to their countries of origin.
The estimates also show continued growth in arrivals from other nations - about 157,000 people in all.
The migration figures are largely based on an official survey carried out at ports, which asks people coming and going what they intend to do - and how much time they have spent in Britain.
Many migration experts have frequently criticised this survey, saying it is simply not accurate enough, given the political nature of the migration debate.
The government has pledged to introduce what is says will be an extremely accurate electronic count of all people coming or going during the coming decade.
Separate figures reveal that government experts believe the UK's population could increase by up to 7.2m people by 2031, higher than previous estimates and a revision of what they said two years ago.
The Government Actuary's Department, a team that predicts population trends to help plan future public spending and pensions, says the UK's population is set to grow annually by about 0.4%, reaching 67m people in 2031.
Of that total, about 4.1m - 57% - are expected to come from migration rather than rising birth rates.
During the same period, the UK is expected to see the average age of the population rise to 43, potentially putting further pressure on pensions.
Figures suggest different parts of the UK will see different population changes.
While there is continued fear Scotland's population will shrink, England's population is expected to continue to rise strongly, almost certainly an indicator of the economic pull of London and the South East.
Humfrey Malins, immigration spokesman for the Conservatives, attacked the figures, saying the system was "absolute shambles".
"This completely undermines Tony Blair's claim that Britain would have firm control over immigration," he said. "In fact net immigration levels are now five times what they were when Labour took power.
But Danny Sriskandarajah, a migration expert at think tank the Institute for Public Policy Research, said the rise was not surprising because of the strength of the economy.
"With more people arriving to fill vacancies, including the arrival of workers from accession states, these figures indicate a healthy economy. rather than a system out of control," he said.
"We need to move beyond scaremongering about numbers and find ways of welcoming those people who choose to come and work in the UK."
A Home Office spokesman said the increase was largely down to EU expansion.
"The Government is committed to pursuing a balanced migration policy and in July this year launched a consultation on a selective points-based managed migration system," said the spokesman.
"This will ensure abuse of the system is tackled but selectively admits migrant workers to the UK where it is in the interests of our economy.
"This country needs migration. tourists, students and migrant workers make a valuable contribution to the UK economy."