It is one of the oldest mosques in Thailand and is still used today by the large Muslim community in the area. It is also the oldest wooden mosque in Thailand and Southeast Asia.

The mosque dates back to the Pattani Kingdom, when it was ruled by a sultan. The villagers in that area who were both Muslims and Buddhists built the mosque in 1634. 

The mosque combines several architectural styles from the Chinese, Thais, and the Malays. The mosque was built with wood from the hummingbird tree and an ironwood tree. Because nails were not invented at that time, wedges were used instead to hold the wood into place. Original roofing was made of palm tree leaves and it was later changed to terracotta tiles.

The mosque consists of two buildings. The smaller building is where the mihrab is located and has three layers of roof. It is also where the Chinese-style minaret is located. The bigger building has more of Thai architectural influence with the Thai-style gable. The walls of both buildings has etchings of Thai/Chinese/Malay designs and patterns.

Most ceremonies held in the mosque are strictly Islamic ceremonies. Although it also serves as a community centre, it still must be treated as a mosque.

According to Wikipedia.