In a church in the western Ukrainian city of Lviv, Tseng Sheng-guang's mother takes one final look at her son, laid in a casket.

She's joined by other relatives and a number of Ukrainians wishing to pay tribute to a man who died thousands of miles from home, fighting for a country he had never visited before.

"Sheng-guang my boy, I want you to know that you were very brave," she later says. "You will always be my baby and I'm proud of you."

Mr Tseng was fighting with the International Legion of Ukraine's territorial defence forces when he was killed last month in the eastern city of Lyman. He was the first Taiwanese to die fighting in Ukraine.

In a statement released after his death, Taiwan's Ministry of Foreign Affairs said that Mr Tseng had "given his life to Ukraine's fight for freedom".

Thousands of foreign soldiers have travelled to Ukraine to fight and the number of Taiwanese among them is small, estimated at about 10.

But Russia's invasion has resonated on the self-ruled island halfway around the world. China claims Taiwan as part of its territory and said it will unify it by force if necessary. Taiwan sees itself as distinct from the mainland.

Tensions in the Taiwan Strait increased sharply following the visit of US politician Nancy Pelosi in August, which infuriated Beijing. China responded with military drills around the island.

Sammy Lin, who made friends with Mr Tseng online, said Mr Tseng was worried Taiwan could one day suffer the same fate as Ukraine.

"I remember him telling his friends that he couldn't stand by while the Ukrainian people were being abused and killed by the Russians," he said.

Mr Tseng was "one of the most righteous people" he had come across, Mr Lin said.