DUBAI, United Arab Emirates -- A prominent human rights activist in Bahrain was sentenced Wednesday to five years in prison over tweets alleging prison torture in his country and misconduct in Saudi Arabia's war in Yemen, despite wide international criticism of his trial.

Nabeel Rajab's sentencing marks the latest chapter in a years-long crackdown on dissent in Bahrain, a tiny island kingdom off the coast of Saudi Arabia that's home to the U.S. Navy's 5th Fleet. He's already serving a two-year sentence handed down in July over television interviews he gave that included criticism of Bahrain.

Rajab has been hospitalized several times during his most-recent incarceration over heart problems and ulcers.

Rajab's Twitter account posted a message Wednesday saying he entered court with a "cheerful smile" before his sentencing. After his sentencing, he raised his hands making a peace sign and laughed.

Get Breaking News Delivered to Your Inbox

The court's decision drew immediate condemnation from activists.

"It's time the Trump administration showed some spine in standing up to the dictatorship in Bahrain," said Brian Dooley, a senior adviser at the U.S. -based group Human Rights First. "It should take punitive action over this verdict and send the American ambassador to visit Rajab in prison to tell him that the U.S. is on his side and against this reckless repression."

Western diplomats were on hand for Rajab's trial Wednesday in Manama, Bahrain's capital.

Bahraini officials did not immediately respond to requests for comment. Bahrain's constitution guarantees its citizens freedom of speech.

Rajab's legal problems began after Bahrain quashed 2011 Arab Spring protests.

In August 2012, Rajab was sentenced to three years in prison for allegedly fomenting clashes between police and protesters. He already was serving a three-month sentence for posting anti-government comments on Twitter. He was released in May 2014 after serving two years, but was detained again over his comments on Twitter.

Bahrain's King Hamad bin Isa Al Khalifa pardoned Rajab in July 2015 over concerns about his health after the activist served some three months in prison. But Rajab was again arrested in June 2016.

Bahrain, a nation only some 290 square miles in size, is home to some 1.4 million people. About half are Bahraini citizens, the majority of them Shiite.

The island has been ruled since 1783 by the Sunni Al Khalifa family. King Hamad, who took the throne in 1999, initially took steps to move the country from an absolute monarchy to a constitutional one. The first parliamentary elections since 1973 were held in 2002.

However, its Shiite majority accused the government of treating them like second-class citizens. They joined pro-democracy activists in demanding more political freedoms in 2011 as Arab Spring protests swept the wider Middle East. Saudi and Emirati troops ultimately helped violently put down the demonstrations.

Amid this recent crackdown, local Shiite militant groups have carried out several attacks on security forces. Independent news gathering in Bahrain also has grown more difficult, with the government refusing to accredit two Associated Press reporters and others while shutting down a prominent local independent newspaper.

America has faced criticism over its stance on Bahrain, which hosts over 7,000 U.S. troops, mostly sailors attached to a sprawling base called the Naval Support Activity in Manama. President Donald Trump's administration has approved a multibillion-dollar sale of F-16 fighter jets to Bahrain without the human rights conditions imposed by the State Department under President Barack Obama.

At a briefing Tuesday, State Department spokeswoman Heather Nauert described Rajab as a "prominent human rights activist" and said American officials were "disappointed" by his recent convictions.

"We continue to have conversations with the government of Bahrain about our very serious concerns," she said.