Four retired Taiwanese military intelligence officers -- including a major general -- have been indicted for spying for China, prosecutors said Saturday.

The quartet were charged with developing a spying network and collecting confidential information for Beijing, the Taipei district prosecutors' office said.

The two sides have been spying on each other since the Nationalists fled to the island to set up a rival government in 1949, having lost a civil war on the mainland to the communists.

China claims self-ruled, democratic Taiwan as part of its territory awaiting reunification, by force if necessary.

Two Taiwanese former colonels were recruited by a Chinese national security official in the southern province of Guangdong, the government lawyers said, and had introduced several colleagues to the official since 2012.

Among those allegedly introduced was the ex-major general, identified by his family name Yueh.

Anti-landing spikes on Taiwan's Kinmen islands, which lie just two miles from the mainland China coast
Anti-landing spikes on Taiwan's Kinmen islands, which lie just two miles from the mainland China coast AFP / Sam Yeh

Yueh received cash, gifts and free excursions during multiple trips to mainland China and Macau, and worked to recruit other officers to "develop an intelligence network" for Beijing, prosecutors said.

The accused "were aware of the standoff between our country and the Chinese communists... but they coveted illegal gains such as the perks (offered by China) to do business there, the financial rewards and free trips," prosecutors said in a statement.

They face charges under national security law and national intelligence work law.

Beijing has ramped up pressure on Taipei since the 2016 election of President Tsai Ing-wen, in part because she regards Taiwan as a de facto sovereign nation.

In October, a Taiwanese court sentenced a lieutenant colonel to four years in prison for spying for Beijing, as Chinese state media reported a crackdown on "hundreds" of espionage cases linked to Taiwan and arrested "a batch of Taiwanese spies and their accomplices".

Chinese state broadcaster CCTV also aired four television "confessions" by Taiwanese nationals detained in China's opaque judicial system.

Multiple Taiwanese nationals have disappeared into Chinese custody accused of various anti-state crimes in cases that have caused an outcry at home.