BEIJING - Beijing warned Monday that the US was turning the cosmos into a "battlefield," after Washington announced a new military arm called the Space Force.

Following concerns that China and Russia are challenging its position in space, U.S. President Donald Trump signed the 2020 National Defense Authorization Act on Friday — which created a new branch of the U.S. military.

Beijing responded by accusing the US of "pursuing the weaponiZation of outer space".

"These actions from the U.S. strongly violate the international consensus of the peaceful use of outer space... posing a direct threat to outer space, peace, and security," said foreign ministry spokesman Geng Shuang at a regular press briefing.

Geng called for the international community to "adopt a prudent and responsible attitude to prevent outer space from becoming a new battlefield".

The Space Force will be the sixth formal force of the U.S. military, after the Army, Air Force, Navy, Marines, and Coast Guard.

"Going to be a lot of things happening in space, because space is the world's newest warfighting domain," Trump told members of the military gathered for the signing.

It will be comprised of about 16,000 air force and civilian personnel, some already taking part in the Space Command, according to Air Force Secretary Barbara Barrett.

China has been making significant investments in space in recent years and pouring billions into its military-run space program, with hopes of having a crewed space station by 2022.

In November it completed a test of its Mars exploration lander, ahead of Beijing's first mission to the red planet slated for 2020.

The U.S. Defense Intelligence Agency warned in a report earlier this year that China and Russia have both developed "robust and capable" space services for intelligence, surveillance and reconnaissance.

"China and Russia, in particular, are developing a variety of means to exploit perceived US reliance on space-based systems and challenge the US position in space," it said.