BANGKOK (Reuters) - Thai Prime Minister Srettha Thavisin ordered an investigation on Wednesday into the death of a young political activist who died after she went on a partial hunger strike during pre-trial detention on charges including insulting the country's monarchy.

Hundreds of people, including activists and opposition lawmakers, joined a candlelight vigil on Tuesday night for Netiporn "Bung" Sanesangkhom, 28, who died in a prison hospital of heart failure, while Western diplomats and rights groups mourned her death on social media.

"It is sad about the loss (of life)... and I want to extend my condolences to the family," Srettha told reporters.

"I have instructed the justice ministry to investigate details about her death," he said.

Netiporn was jailed in January for contempt of court and her custody was extended after her bail was revoked in a royal insult case, legal aid group Thai Lawyers for Human Rights said. She went on a hunger strike for a month before her health deteriorated.

She started to take some soft food in early April but refused to take vitamins and minerals although she was not in a critical condition prior to her death, the Corrections Department said in a press conference on Wednesday adding that they are waiting for an official autopsy to determine the cause of death.

"Her vital signs were normal, everything was normal until the emergency," said Pongpak Areeyapinan, director of the prison hospital.

Netiporn is the first activist to die in custody since the outbreak of youth-led protests in 2020 calling for reform of the monarchy.

She was among 272 people who have been charged with royal insult since 2020 according to Thai Lawyers for Human Rights.

Thailand's lese majeste law, one of the strictest in the world, protects the palace from criticism and carries a jail sentence of up to 15 years for each violation.

Since January, bail requests for 27 political activists in pre-trial detentions, including 17 who are charged with lese majeste, have been rejected by the court, the legal aid group said.

(Reporting by Panu Wongcha-um and Panarat Thepgumpanat)