Police initially said five men carrying assault rifles on Monday evening sprayed the worshippers with bullets.
But a military official later said there were only two attackers.
One of the dead was the imam of the mosque in Narathiwat province.
No one has claimed responsibility for the attack.
Army spokesman Colonel Parinya Chaidilok said the attackers appeared to be trying to make it look as though Thai security forces were responsible. He said it was impossible that the military was involved.
Agencies