Six Thai men were sentenced to death by a court on Wednesday for the murder of a family of eight in southern Thailand last year, the court said in a statement.

The men were found guilty of murder, holding others captive and organized crimes after they stormed into a house in Krabi, a tourist town 780 kilometres south of Bangkok, in July and shot dead eight people in the house.

Three of the victims were children aged under 15 years old.

A boy, who was three months old at the time, was among three people in the house who survived the attack because he was shielded by his mother during the shooting spree.

The men were dressed in military-style camouflaged clothing pretending to be authorities making an inspection, and held the house's 11 residents hostage before opening fire, according to Krabi police.

The attack was unusual for the tourist resort, known for its pristine beaches and famed island Koh Phi Phi.

A police investigation pointed to a land dispute with the house's owner, who was also a village headman, as the motive.

Although the men pleaded guilty, the judges deemed the crimes ‘unusually ruthless’ and decided not to hand them a more lenient sentence of life imprisonment as per usual practice.

In 2015, two Myanmar workers were sentenced to death by a Thai court for murdering a British couple holidaying on the southern island of Koh Tao. Thailand last carried out an execution in 2009.

Related Story