Britain's domestic intelligence agency MI5 Tuesday warned that China was trying to recruit parliamentarians through spies disguised as headhunters, amid concern over Beijing's activities in the UK.

There have been heightened fears about Chinese espionage in the UK after a politically sensitive case against two alleged spies was dropped, and as the government mulls a request from Beijing to build a controversial new embassy building in London.

"Earlier today, MI5 issued an espionage alert" to parliament and parliamentary staff "to warn them about ongoing targeting of our democratic institutions by Chinese actors", security minister Dan Jarvis told the House of Commons.

"Our intelligence agencies have warned that China is attempting to recruit and cultivate individuals with access to sensitive information about parliament and the UK government," said Jarvis.

According to the MI5 alert, the activity was being carried out by "Chinese intelligence officers, often masked through the use of cover companies or external headhunters", said Jarvis.

MI5 named two online profiles that are "believed to be legitimate headhunters working for Chinese intelligence officials" and building relationships with targets through platforms such as LinkedIn.

The espionage alert, which the government said was issued to disrupt the spying activity, comes weeks after prosecutors dropped charges against two men, including a parliamentary researcher, accused of spying for Beijing.

The government denied accusations that the charges were scuppered to protect its improving but fragile relations with China, while lawmakers and the MI5 voiced frustrations that the case had been abandoned.

Beijing had previously denied the spying accusations.

- Universities, cyber threats -

In his statement, Jarvis set out measures "to disrupt and deter the threats" posed by China and other states, including greater scrutiny of political funding and security briefings for political parties.

He also said British universities were the target of Chinese attempts to influence their "independent research and interfere with activity on campus".

Government ministers will hold a "closed event" with university leaders to discuss the risks, Jarvis announced.

The minister also said the UK was "ready" to disrupt the "dangerous and unrestrained offensive cyber ecosystem that China has allowed to take hold", and will "not shy away from using all tools at our disposal".

Jarvis's hardline statement will hope to allay concerns that Prime Minister Keir Starmer's Labour government was prioritising Chinese investment to spur Britain's struggling economy over security concerns.

However, it could put Starmer in a tight spot, with a delayed decision on whether or not Beijing can build a sprawling new embassy in London -- sparking concern among residents and rights advocates -- due next month.

Multiple Western nations accuse Beijing of using espionage to gather technological information.

They have also accused hacking groups backed by China of a global campaign of online surveillance targeting critics.