By Aukkarapon Niyomyat

BANGKOK (Reuters) - Thailand sentenced two students to jail on Monday for 2-1/2 years for insulting the monarchy in a university play, in a case which drew dozens of activists to a protest outside the court in defiance of a ban on demonstrations.

The country has been under martial law since a May coup. The convictions come amid anxiety over the health of ailing King Bhumibol Adulyadej, 87, and the issue of royal succession.

Thailand's lese-majeste law is the world's harshest and makes it a crime to defame, insult or threaten the king, queen or heir to the throne or regent. The junta has stepped up a campaign against perceived insults to the monarchy since it took power.

Patiwat Saraiyaem, 23, and Porntip Mankong, 26, were both convicted on a count of lese-majeste, which carries a maximum of 15 years in prison.

"Both suspects violated the 112 law and receive a five- year prison sentence ... reduced by half," a judge said, referring to the penal code section.

The term was cut because both confessed, the judge said.

Patiwat appeared in court in leg irons. The pair were arrested in August over a satirical play they put on more than a year earlier at Bangkok's Thammasat University.

The play, called 'The Wolf Bride', marked the 40th anniversary of an October 1973 military crackdown on a pro-democracy student protest at the university. Set in a fictional kingdom, it featured a fictional king and his adviser.

In Thailand, lese-majeste complaints can be filed by anyone, against anyone, and are always investigated by police.

Pornthip, who directed the play, said she was not afraid of prison.

"I've learned many things - dancing, playing music and I've made many friends," Pornthip told reporters before the verdict, referring to her time in detention since her arrest.

About 40 student gathered outside the court wearing white shirts with the words "We are friends" in Thai and English. Some raised a three-finger salute that has come to represent opposition to the junta.

Story continues

The declining health of King Bhumibol, the world's longest-reigning monarch, has formed the backdrop to Thailand's 10-year political crisis spawned by competition for power between populist former Prime Minister Thaksin Shinawatra and the establishment dominated by the royalist military.

The king has long been seen as a figure of unity above the political fray. Crown Prince Maha Vajiralongkorn has yet to command his father's level of popular support.

Pornthip's mother, Nuan Mangkong, told reporters the pair would not appeal: "We want this matter over."

(Additional reporting by Damir Sagolj and Juarawee Kittisilpa; Writing by Amy Sawitta Lefevre; Editing by Clarence Fernandez, Robert Birsel)