BEIJING -- China's president warned Wednesday that religions must be independent from foreign influence, as the government asks domestic religious groups to pledge loyalty to the state.

China is ruled by the officially atheist Communist Party, and Beijing attempts to control a variety of religions and their spread.

"We must manage religious affairs in accordance with the law and adhere to the principle of independence to run religious groups on our own accord," President Xi Jinping said at a high-level party meeting that sought to unite non-Communist Party groups and individuals. His comments were widely reported in state media.

"Active efforts should be made to incorporate religions into socialist society," Xi said, adding that the party's religious work should be about winning over the hearts and minds of the public for the party.

As part of its religious policy since the 1990s, the government believes that hostile foreign forces can use religions to infiltrate Chinese society by winning over the population and subverting party rule. It has banned foreign missionary work, refused to acknowledge any appointment by foreign religious entities such as the Vatican, and declared any unregistered religious groups illegal.

In the western regions of Xinjiang and Tibet, the government says foreign forces are using Islam and Tibetan Buddhism to incite local people to defy Chinese rule.

Still, religions have spread quickly in the country, which is suffering a crisis in beliefs as people largely abandon communist values.

Since early 2014, the eastern Chinese province of Zhejiang has forcibly removed crosses from more than 400 Christian churches in an apparent effort to reduce the rapidly growing religion's visibility.

However, the government has been vague about what constitutes foreign forces and whether the term refers to foreign individuals, foreign non-governmental groups, foreign cultural traditions or foreign governments, said Yang Fenggang, a scholar of Chinese religions at Purdue University.

Such a policy can also be difficult to carry out in an age of globalization and at a time when China wants to promote its own culture outside China, he said.

"How can you influence the foreign but not be influenced by the foreign?" Yang wrote in an email.