BANGKOK, Thailand - A few lines in a novel that sold just seven copies have earned an Australian writer three years in a Thai prison.

The conviction of Harry Nicolaides on Monday for insulting the monarchy is one of a recent flurry of such cases, underlining Thailand's sensitivity about how to safeguard the royal institution when 81-year-old King Bhumibol Adulyadej -- the world's longest-serving head of state -- passes from the scene.

Nicolaides, 41, was sentenced for insulting the king and Crown Prince Vajiralongkorn in his self-published 2005 book "Verisimilitude," which he has said sold seven copies.

Shackled at the ankles and handcuffed, Nicolaides said he felt "dreadful" as guards escorted him out of the courtroom.

"I would like to apologize," he said, adding that he had "unqualified respect for the king of Thailand" and had not intended to insult him. He said he endured "unspeakable suffering" during his pretrial detention, but did not elaborate.

The offending passage in the novel -- described by Nicolaides as a commentary on contemporary Thai political and social life -- was just a few sentences long and described the turbulent marital relations of its fictional prince.

The passage "suggested that there was abuse of royal power," and caused "dishonour" to the king and the heir apparent, the presiding judge told the court.

The prosecutor warned reporters Monday that the law prohibited publication and repetition of the material.

Thai law mandates a penalty of three to 15 years imprisonment for "whoever defames, insults or threatens the king, the queen, the heir to the throne or the regent."

Bangkok's Criminal Court sentenced Nicolaides to six years behind bars but reduced the term because he had entered a guilty plea to violating the lese majeste law, the judge said.

Nicolaides, from Melbourne, lived and taught in Thailand from 2003 to 2005. He was arrested Aug. 31 last year at Bangkok's international airport as he was about to board a flight home, apparently unaware of a March arrest warrant, according to rights groups. He was indicted in November and denied bail.

Until recently, prosecutions for insulting the monarchy have been uncommon, with the charge mostly used for partisan political purposes as a way of smearing its targets.

But questions about the monarchy have assumed a higher profile as the country considers the eventual succession to Bhumibol, the only king most Thais have ever lived under.

Although he is a constitutional monarch without much official power, Bhumibol -- with the backing of the military -- has since the 1960s held substantial political influence, usually exercised only in times of national crisis.

In the past three years, however, the palace's role has become a point of debate as Thailand has suffered through almost continuous political turmoil, including a 2006 military coup and the weeklong takeover of Bangkok's two airports last November by anti-government protesters.

In some eyes, the king's influence and popularity came under challenge by billionaire politician Thaksin Shinawatra, who became prime minister in 2001 and whose party won an unprecedented absolute majority in parliament in 2005.

But after demonstrations in Bangkok calling for Thaksin to step down because of alleged corruption and abuse of power, the military ousted him in 2006 -- the same year the country celebrated the king's 60th year on the throne.

One reason the army gave for its coup was a claim that Thaksin had treated the king with disrespect.

Other recent targets of lese majeste complaints include Thai activist Chotisak Onsoong, who was summoned in April 2008 for refusing to stand up during the playing of the royal anthem before a movie; Ji Ungpakorn, a political scientist who wrote about the 2006 coup; and Sulak Sivaraksa, a prominent Buddhist intellectual for questioning whether lavish official celebrations of the king's reign were an appropriate way to honour the monarchy.

Nicolaides does not intend to appeal the court's sentence, "but rather wishes to focus efforts on considering an application for royal pardon," said a statement issued late Monday by his brother Forde Nicolaides.

The statement, published on the Southeast Asian specialist blog New Mandala, encouraged the Australian government to continue to assist with efforts "to seek Harry's release at the earliest opportunity."

Nicolaides is not the first foreigner to be charged with insulting the monarchy.

In 2007, a Swiss man, apparently acting in a drunken frenzy, defaced images of King Bhumibol and was given a 10-year prison sentence. It was the first conviction of a foreigner for lese majeste in at least a decade. The man was pardoned by the king after about a month behind bars.

Thailand's new Prime Minister Abhisit Vejjajiva said last week his government would try to ensure the lese majeste law is not abused. But he added that the monarchy must be protected because it has "immense benefits to the country as a stabilizing force."

His government has blocked more than 2,000 allegedly anti-royalist websites.