Image caption The Chinese suit says the US president acted in an unlawful manner

A Chinese-owned firm in the US is suing President Barack Obama after he blocked a wind farm deal on national security grounds.

Ralls Corp, a private firm, acquired four wind farm projects near a US naval facility in Oregon earlier this year.

Mr Obama signed the order blocking the deal last week. The lawsuit alleges the US government overstepped its authority.

It is the first foreign investment to be blocked in the US for 22 years.

The block on the wind farms comes just weeks ahead of November's US presidential election.

China's state-run news agency Xinhua said "China-bashing" in order "to woo some blue-collar voters" was the reason for the decision.

Analysis Mr Obama has been criticised by the Republican nominee, Mitt Romney, for not taking a tough enough line with China over trade and investment practices. Indeed, Mr Romney has said he will label China as a "currency manipulator" if he is elected. US politicians have long alleged that China keeps its currency artificially low giving its exports an unfair advantage and, in turn, costing the US jobs. That is denied by Beijing. But many Chinese officials are now used to the four-year election cycle when increasingly China has become the whipping boy. One official who worked at the Chinese embassy in Washington told me that the heated rhetoric is not taken too seriously in Beijing. While the US election is being followed in China, the focus here is the country's own once-in-a-decade leadership transition, which will get under way next month.

The move forced Ralls Corp to divest its stake in the projects, which were located near restricted airspace used by the Naval Weapons Systems Training Facility.

Ralls Corp's complaint, filed on Monday, alleged that the US president had "acted in an unlawful and unauthorised manner".

The firm, owned by two Chinese nationals, said in its suit that Mr Obama failed to adhere to the law to treat Ralls Corp on equal terms. The court documents were made public on Tuesday.

Issuing the order last week, the White House said: "There is credible evidence that leads me to believe that Ralls Corporation... might take action that threatens to impair the national security of the United States."

'No threat'

However, the company said in its suit that Mr Obama had not produced evidence to support that.

The military has said it uses the Oregon base to test unmanned drones and other equipment for electronic warfare. The aircraft fly as low as 200ft (60m) at speeds of as much as 300mph (500km/h).

Ralls Corp is owned by two executives from Sany Group, China's largest engineering machine producer.

Responding to Mr Obama's decision last week, a representative of Sany Group told Chinese state media that the deal posed no threat to US security.

Zhou Qing, a company legal officer, told Xinhua on 29 September that Mr Obama's move was more likely a campaigning ploy or to protect the US wind farm industry.

China's trade advantage over the US has become a focus of Mr Obama's battle for re-election against Republican contender Mitt Romney.

In mid-September a new survey by the Pew Research Center showed that while most Americans saw US relations with China as "generally good", they also saw China as posing the greatest danger to the US.

The majority of those surveyed viewed China as a competitor of the US, rather than as an enemy or partner.

But at the same time, about 52% viewed China's rise as a world power to be a major threat to the US. At least 26% also saw China as posing the greatest danger to the US, over Iran and North Korea.

Last month, the Obama administration filed a complaint with the World Trade Organization against Chinese subsidies for its car industry.