Phang Nga police chief Pol Maj Gen Worawit Parnprung said the 21 escaped from the immigration office in Tambon Tham Namphud in Mueang Phang Nga at 3 am
Worawit said the Rohingyas used a saw to cut the iron bars at their detention room at the immigration office and escaped in two groups.
The first group of 15 migrants escaped along a canal to the Phang Nga bay and the second group of six Rohingyas escaped to mountains.
Police later spotted three of them at a lamb farm. While police tried to arrest them, they assaulted an office who fired his pistol in a self-defence and killed a Rohingya man.