Bangkok (AFP) - A senior police officer charged under Thailand's controversial royal defamation law has died in custody after "hanging" himself in his cell, officials said on Saturday, prompting an investigation.

Earlier this week Police Major Prakrom Warunprapa was charged with lese majeste, one of the strictest such laws in the world as it carries up to 15 years in jail on each count for anyone convicted of insulting the king, queen, heir or regent.

The officer was charged along with a well-known fortune teller and his assistant for making claims of closeness to the monarchy to extract benefits, according to a court statement.

On Saturday Thailand's corrections department said a prison guard had found Prakrom "hanging inside his cell" at around 10 pm on Friday.

"The guard administered first aid before sending the suspect to hospital in the corrections department where the doctor pronounced him dead," it said in a statement.

Prakrom's body will undergo an autopsy and a fact-finding committee has been set up by the department to "investigate" his death, it added.

The exact nature of the crime the three men have been accused of has not been revealed as is common in royal defamation cases.

Even where the allegations are known, journalists routinely self-censor in order to avoid falling foul of the draconian law.

Prakrom had faced additional charges including possessing unlicensed firearms and falsifying documents.

Prosecutions under the lese majeste laws protecting Thailand's widely revered King Bhumibol Adulyadej, 87, have skyrocketed since last May's military coup toppled an elected government.

But critics of the law say it is often used to pursue political opponents of the country's military and royalist elite.