TAIPEI, Taiwan — Taiwan is investigating four members of a small political party that advocates unification with China, on the suspicion that they gave Chinese officials classified information related to an espionage case.

Beijing said it was watching the situation closely. The development comes as China is putting increasing pressure on Taiwan, which it considers a part of its territory that must eventually come under its control.

Wang Ping-chung, spokesman for the New Party, which holds no seats in Taiwan’s legislature, and three other party members affiliated with its youth wing were detained and questioned on Tuesday, the Taiwan authorities said. They have since been released.

Prosecutors and investigators at the Ministry of Justice Investigation Bureau, which is conducting the inquiry, also searched the homes of the four men, who recently visited China. They are suspected of providing Chinese officials with information related to the investigation of Zhou Hongxu, who is serving a 14-month prison sentence after a Taiwan court convicted him of spying for China in September.