A motorcycle taxi driver shot dead four people during a gune rampage police said was fuelled by jealousy, and then killed himself, in Bangkok's Lak Si district on Monday night.
The shootings occurred in Soi Chaeng Wattana 6. The killer was identified by police as Somchai Kaewkomol, 54.
According to eyewitnesses, about 7.30pm Somchai arrived on a motorcycle at Nicknack market in Soi Chaeng Wattana 6 and shot his estranged wife's mother, a lottery vendor, in the head. She died later at hospital.
Somchai then drove to Ban Suan Ratchathani condominium, about one kilometre from the market. He broke into a room and shot dead the mother's elder sister and two boys aged 7 and 9.
All his victims were shot in the head.
Somchai then shot himself in the head and died in front of the condominium.
Police said the two boys were the sons of his estranged wife Viraya Sinma by her former husband.
He said Somchai and Ms Viraya had lived together as a couple for about two years. About a month ago, Ms Viriya broke up with him after they often quarrelled, and she went to live with another man.
Jealousy and family problems were believed to be the motive for the killings, police said.