TAIPEI, Taiwan -- An assailant wielding a samurai sword and carrying a Chinese flag in his bag injured a guard outside Taiwan's presidential office building on Friday in what authorities are calling a politically-motivated attack.

The 51-year-old man, identified by his surname, Lu, was overpowered by other guards and prevented from entering the nearly 100-year-old structure in the centre of the capital. It wasn't immediately clear if President Tsai Ing-wen was in her office at the time of the attack. The guard was being treated for a wound to his neck.

The official Central News Agency said Lu had stolen the sword from the nearby Armed Forces Museum by smashing a glass display case with a hammer.

The agency said a Chinese flag was found in Lu's bag and quoted a police as saying that he told officers he committed the attack to "demonstrate my political position."

No further details were given, although a small minority in Taiwan actively support China's claim to sovereignty over the self-governing island democracy. Tensions have risen between Taipei and Beijing since Tsai's election last year because of her refusal to agree that Taiwan is an inherent part of China.

A large majority of Taiwanese support maintaining the island's de-facto independent status and political violence has become relatively rare in Taiwan in recent years, limited mainly to fisticuffs between ruling and opposition party lawmakers in the legislature.