A Taiwanese man wielding a Samurai sword stabbed a military guard outside Taiwan's presidential office on Friday (18 August).

The man, identified only as Lu, was carrying the Chinese national flag at the time of the attack.

After police arrested him, Lu said he was expressing his political views and had stolen the sword from a nearby military museum.

The man, described as an unemployed engineer, told the police he had taken the weapon "to protect himself" in case he would be stopped, Taiwan News reported.

It is believed Lu stabbed the guard in the neck after he stopped him as he tried to enter the building from a side gate.

The guard was rushed to hospital and it is believed his life is not in danger.

President Tsai Ing-wen was inside the building at the time of the attack , attending an event with families of presidential staff, a spokesperson was quoted as saying.

The attacker "took a hammer and smashed a display case in a history museum to steal a samurai sword", a police official, who spoke on condition of anonymity, told AFP.

"A Chinese national flag was found in his backpack. He said he wanted to express his political stance by going to the presidential office," the official continued.

The attack came as relations between Taiwan and China have strained due to President Tsai's refusal to recognise Taiwan as part of China.

China began ruling over Taiwan after Wolrd War II. Beijing considers the island as a breakaway province that will eventually be reintegrated. On the other side, Taiwan considers itself as a sovereign state.

In the 1980s, China introduced a "one country, two systems" policy, whereby Taiwan would be granted a great deal of autnomy if it accepted to be reunifed with China. Taiwan rejected the proposition.

Tsai Ing-wen
Taiwan’s President Tsai Ing-wen waves before addressing during an inauguration ceremony in Taipei, Taiwan May 20, 2016 REUTERS/Tyrone Siu