“Seventy percent of the people in Taisi’s six villages bear the family name Ting (丁), which is derived from the last syllable of ‘Shamduddin,” said Ting Ching-chiang (丁清江), a retired Taisi schoolteacher who devotes himself to studying his family’s history.

Shamsuddin was born to a noble family in Central Asia and moved to China during the Yuan Dynasty when China was part of Genghis Khan’s empire, Ting said.

Aside from their connection to central Asian nobility, the Tings are also linked to the Prophet Mohammed.

“Sayyid is an honorable title given to descendants of the Prophet Mohammed, hence Sayyid Shamsuddin must be connected to Mohammed,” said Ishag Ma (馬孝棋), deputy secretary-general of the Chinese Muslim Association.

As Shamsuddin was favored by the Mongolian court and served in many official positions, his descendants feared retaliation from the Chinese when they overthrew Mongolian rule in the 14th century, and decided to disguise themselves as Han Chinese.

“They took ‘Ting’ as their family name and a group of Shamsuddin’s descendants moved to rural areas of Quanzhou in Fujian Province,” Ting said.

The “Muslim Tings” — as they call themselves — followed other Hoklo settlers from Fujian in migrating to Taiwan.

Already trying to hide their identity in Fujian, the Muslim Tings in Taiwan had completely given up their religion and traces of Islam are nowhere to be found in Taisi.

“But a lot of us — though not everyone — still know that our ancestors were Muslims,” Ting said.

Asked if anyone belonging to the Muslim Ting family in Taisi would consider converting to Islam, Ting said it was “not likely” as Islam is a very foreign religion for them, and most have adopted local Taoist, Buddhist or Christian beliefs.

A similar thing happened to another branch of the Muslim Ting family in Lugang Township (鹿港), Changhua County, a busy historic harbor town only a 40-minute drive from Taisi.

“We know that our ancestors were Muslims because it’s written in the family book,” said Ting Chen-hsiang (丁禎祥), a retired local school principal and director of the Lugang Ting Family Mansion Museum.

Nearly 200 years ago, Ting Chen-hsiang’s family migrated from one of the villages in China’s Fujian Province that still has a large Muslim population bearing the surname “Ting,” he said.

“When in Rome, do as the Romans do. My ancestors had stopped practicing Islam upon arriving in Taiwan because of public pressure,” Ting Chen-hsiang said, standing in the courtyard of his family mansion.

However, Ting Chen-hsiang’s ancestors still left some hints.

“The sanheyuan (三合院) is an architectural style for family houses in Taiwan, but our family house is built as a siheyuan (四合院) — this is how our ancestors secretly tried to preserve our heritage,” Ting Chen-shiang said.

Sanheyuan refers to a U-shaped house with a courtyard in the middle.

A siheyuan, on the other hand, is a square-shaped house with a courtyard in the middle.

“My ancestors constructed a siheyuan instead of a sanheyuan because a siheyuan resembles the Chinese character hui (回) when seen from above,” he said.

“Hui” is a minority Islamic people living in northwestern China and hence Islam is commonly referred to as huijiao (回教) or “religion of the Hui people.”

If the building style is a secret hint that Ting Chen-hsiang’s ancestors left behind for the Muslim Tings in Lugang, the ancestors of another Muslim family in the town — the Kuos (郭) — left them a more obvious hint.

“It has been passed down by word of mouth and recorded in certain historic documents that there used to be a mosque in the Beitou (北頭) area of Lugang,” said Chen Shih-hsien (陳仕賢), a local Lugang historian. “According to studies, the former site of the Kuo family ancestral temple should’ve been the mosque a few hundred years ago.”

The new Kuo family temple has been turned into a Taoist facility, the Pao’an Temple (保安宮).

The two-story building looks no different from other Taoist temples, with sculptures of deities on the main table.

Although it's been turned into a Taoist temple, the Kuos in Beitou still hold their ancestral worships at the temple, with an interesting twist.

"We do eat pork, but there's a practice that's been passed down through generations that pork cannot be presented as a sacrifice at ancestral worships," local borough chief Kuo Hsien-chin (郭獻欽) said.

Chen said that the Kuos do not eat pork during funerals of family members either.

"It would've been interesting to come to Lugang 300 years ago to see a mosque standing just a few hundred meters away from a temple worshipping [the goddess of the sea] Matsu [媽祖]," Ma said.