Two Chinese men have been detained over an attack last week on the Japanese ambassador's car in Beijing in which a flag was ripped off of the front of the vehicle, Chinese state media reported Tuesday.

The men, aged 23 and 25, are being held for disturbing public order, and another man has been issued a warning, the official Xinhua News Agency said.

It said they admitted that they committed the Aug. 27 attack, which came during a flare-up in tensions over a disputed group of uninhabited islands in the East China Sea.

In the incident, Ambassador Uichiro Niwa's car was hemmed in by two other vehicles on one of Beijing's outer ring roads as he was returning to the embassy. A man then got out and ripped the Japanese flag off, damaging the vehicle's flagpole and prompting protests from Tokyo.

China's Foreign Ministry expressed deep regret over the incident and said authorities would work to prevent a recurrence. Beijing faces a constant struggle to contain anti-Japanese sentiment that could harm relations with Tokyo or turn on the rulers in Beijing. Many Chinese still resent Japan's brutal World War II occupation of much of China and are quick to take offense at perceived slights from Tokyo.

Anti-Japanese street protests broke out this summer after Japan detained and later released 14 Hong Kong activists who landed on the islands, called Diaoyu in Chinese and Senkaku in Japanese.

The islands are controlled by Japan but also claimed by China and Taiwan.