It is considered the oldest mosque located in the inner city area, or Rattanakosin Island near the Grand Palace and royal field Sanam Luang.
This mosque dating back to the King Phutthayotfa Chulalok (Rama I)'s reign during the early Rattanakosin period.
It was built by war captives brought back to Bangkok from Pattani after the autonomous Muslim sultanate in the south was subjugated by an army commanded by the younger brother of the King, Somdet Phra Bawornrajchao Maha Sura Singhanat.
His Majesty the King allowed the Pattani Muslims to build houses and a mosque within the city walls, granting them land in Ban Tuek Din (along present-day Ratchadamnoen avenue near the Democracy Monument and Satriwitthaya School) and in Bang Lamphu (near Chakraphong road).
In addition, these captives were also goldsmiths serving in the royal court of the King Phutthayotfa Chulalok.