SEOUL--Police on Monday detained six South Koreans for allegedly illegally entering a Japanese diplomatic facility in South Korea and staging an anti-Tokyo demonstration there.

The incident came amid growing anti-Japanese sentiments in South Korea as the two countries are locked in trade and political disputes. On Friday, a 78-year-old South Korean man died after setting himself on fire near the Japanese Embassy in Seoul.

The six men and women were given temporary passes to enter the Japanese Consulate in the southeastern city of Busan earlier Monday after they told staff there they would visit a library inside the building, according to Busan police officers.

They initially stayed at the library. But they later abruptly dashed out to a consulate yard, holding a placard that read "Abe must apologize," referring to Japanese Prime Minister Shinzo Abe. They also shouted slogans criticizing Japan's recent decision to tighten its export controls of some high-tech materials, the police officers said.

No major violence or clashes were reported. But police detained the six people for trespassing because they were admitted to the building to visit the library, not stage a rally, the officers said, requesting anonymity because they were not authorized to speak to the media on the matter.

While the six were being detained, activists were holding anti-Japanese rallies outside the consulate. Later Monday, about 30 people rallied in front of a Busan police station, calling for the release of the six people, according to police.

South Korea's Yonhap News Agency reported that the six people are university students belonging to a newly launched anti-Japanese organization in Busan. Police said they couldn't immediately confirm the Yonhap report.

South Korea and Japan are both key U.S. allies in Asia that are closely linked to each other economically and culturally. But they have often been embroiled in historical and territory disputes stemming from the Japanese colonial occupation from 1910-45.

South Korean officials say the Japanese trade controls are retaliation for local court rulings ordering Japanese firms to pay compensation to former Korean forced laborers during the colonial period. Japan denies that, saying the strengthened export controls were taken out of national security concerns.