At least three people have been killed and dozens more wounded after an explosive was thrown into a crowd at a festival in Thailand.

The attack took place shortly before midnight local time on Friday at the Red Cross Doi Loyfa fair, held annually in the Umphang district in the northern Tak province.

Two suspects are being held in custody, but no charges have been pressed, the Associated Press and local media report, citing Thai police.

At least 48 people have been wounded, six of whom are critically injured, police said.