Colonel Parinya Chaidilok, a Thai military spokesman, said two individuals carried out the attack.
He confirmed that 10 people were killed instantly while another died on the way to hospital. The 12 wounded were all in critical condition, he said.
Surge in violence
Most of the violence in Thailand's deep south has been blamed by authorities on Muslim armed separatist groups.
The identities of those who attacked the mosque on Monday were not known, Parinya said, but he added that they had tried to make it look as if Thai security forces were responsible.
"They are trying to make it look like the attackers are the authorities, because Muslims would apparently not shoot inside a mosque. But it is impossible that it is the work of the military," he said.
The attack came hours after a soldier died in a bomb blast and after opposition fighters shot dead a rubber-tapper in Narathiwat.
Abhisit Vejjajiva, Thailand's prime minister, last week defended his government's handling of the crisis in the south.
The government agreed in April to extend emergency rule for another three months in the region, despite a promise by Abhisit in January to cancel the order.
The latest rebellion in the former ethnic Malay sultanate began in January 2004 when fighters raided an army base, killing four soldiers.