BEIRUT – A Saudi court sentenced a prominent Saudi American doctor to six years in prison Tuesday despite pressure from the Trump administration to drop the charges against him and allow him and his family to travel.

The doctor, Walid Fitaihi, was convicted on charges that included obtaining U.S. citizenship without permission and criticizing other Arab states in Twitter posts — charges that U.S. officials have privately dismissed as politically motivated.

Fitaihi, who completed his medical training in the Boston area, ran a private hospital in the Red Sea port city of Jiddah and had become a household name in the kingdom as a motivational religious speaker. Saudi authorities detained him in November 2017 amid an arrest campaign that saw hundreds of the kingdom's richest princes and businessmen locked in the Riyadh Ritz-Carlton hotel on allegations of corruption.

Fitaihi later told relatives that he had been tortured in detention with electric shocks and was whipped so badly that he could not sleep on his back for a number of days. He was released last year, but the kingdom barred him, his wife and six of his children — all U.S. citizens — from leaving the country while his case made its way through the courts.

A Saudi court convicted him of affiliation with the Muslim Brotherhood, a banned Islamic group that Saudi Arabia considers a terrorist organization but the U.S. does not, and of damaging relations with other Arab countries through his posts on Twitter, court documents said. He was also convicted of donating money to unnamed "suspicious parties."

In October, Secretary of State Mike Pompeo said he had discussed the case with the Saudi foreign minister, Prince Faisal bin Farhan, and asked that the travel ban against the doctor and his family be lifted.

Tuesday's sentence made clear that the U.S. requests had not been granted. The court dropped one charge related to financing terrorism for lack of evidence, the documents said.

The judge reduced Fitaihi's sentence by two years and said he would also be credited with the 21 months he already served, leaving him with two years and three months to serve.