LONDON - Annual net migration to the United Kingdom hit a record of 745,000 last year and has stayed at elevated levels since, data showed on Thursday, heaping pressure on Prime Minister Rishi Sunak to act to reduce it in the run up to an election.

High levels of legal migration have for more than a decade dominated Britain's political landscape, and will be a key battleground again in the vote which is expected next year.

The data is a fresh setback for Sunak, whose flagship policy to tackle illegal arrivals was all but dashed last week by a court ruling that a plan to send asylum seekers to Rwanda was unlawful.

As well as his pledge to "stop the boats", a reference to illegal migration, he has also promised to cut the number of people coming into Britain legally, responding to voter worries about the pressure on public services and housing shortages.

For the year ending December 2022, the ONS revised up the net migration figure to 745,000, a new record high and up 139,000 on its previous estimate. It also said the net migration number for the year ending June 2023 was 672,000, up from 607,000 a year earlier.

The ONS said the majority of immigration was now non-EU nationals, with the increase in the year to June mainly driven by migrants coming for work, particularly to fill shortages in the health and social care sectors.

Those coming to Britain to study make up the biggest proportion of non-EU nationals, it added, with evidence showing in recent years more students are staying for longer and moving on to work visas.

The top three non-EU nationalities for immigration in the year to June were Indian, Nigerian and Chinese, it said.

Interior minister James Cleverly said the government wanted to eliminate abuse of the visa system to get numbers down.

"The government remains completely committed to reducing levels of legal migration," he said in a statement.

The high levels of migration -- more than double the 329,000 figure recorded in the year before the 2016 Brexit vote which was in part a driven by concerns about migration -- illustrate the challenge Sunak faces given the country's labour shortages.

"This level of legal immigration is unsustainable both economically and socially. There is no public mandate for it, it is beyond our public services’ capacity to support and it undercuts UK productivity and wages by substituting cheaper foreign labour," former Conservative minister Simon Clarke said on X. "We need an urgent change of approach."

The ONS said the number of people arriving on humanitarian routes such as special schemes for people from Ukraine and Hong Kong, which have helped drive an increase in the figures over the last two years, fell during the most recent period, the 12 months to the end of June.

While the government may try to cast the fall from 745,000 in 2022 to 672,000 as evidence its policies to reduce numbers were starting to work, the ONS said it was not yet clear whether the number had peaked.

The opposition Labour Party's home affairs spokesperson Yvette Cooper said the figures showed the Conservatives "have no grip on immigration and asylum and no plan for the economy."

(Reporting by Muvija M and Sarah Young, writing by Sarah Young, Editing by Kylie MacLellan, Alexandra Hudson)