"The man died at hospital after suffering two gunshot wounds at the mosque, he was the father of the imam (mosque's leader). The deputy village chief escaped with minor injuries to his leg," Somchai said.
He could not clarify exactly how many gunmen were at the scene.
Thailand's three Muslim-majority southernmost provinces are in the grip of a decade-long insurgency which has seen more than 6,000 people killed -- the majority of them civilians.
The rebels are fighting for a level of autonomy, accusing Thai authorities of riding roughshod over their distinct culture and carrying out human rights abuses.
These grievances are frequently seized upon by militants as a reason for targeted killings of Buddhist and Muslim representatives of the Thai state, including teachers, government officials and security forces.
The fasting month of Ramadan is sacred for the world's estimated 1.6 billion Muslims because it is during that month that tradition says the Koran was revealed to the Prophet Mohammed.