Dubai's ruler pardoned American R&B producer Dallas Austin on Tuesday, hours after he was sentenced to four years in prison for possession of cocaine, two of the producer's lawyers said.

Dubai ruler Sheik Mohammed bin Rashid Al Maktoum issued the pardon but Austin has not yet been released from jail, said the lawyers.

One lawyer, who spoke on condition of anonymity because of the sensitivity of the matter, said Austin's release was "a matter of paperwork." The lawyer said he needed to be cautious about the pardon until the Grammy-winning producer was safe on a plane back to his home in Atlanta.

A second member of Austin's five-attorney legal team confirmed the pardon, but said he had not yet received details. Austin's release could take a few days, the attorney said.

A court sentenced Austin, who has created tunes for Madonna and Janet Jackson, to four years in prison earlier Tuesday for possessing 1.26 grams of cocaine, his defense team said. The court had also ruled that the 34-year-old should be deported after serving his prison term.

Austin told the court on Sunday that he didn't mean to break the law in the United Arab Emirates.

He looked pale and worried Tuesday as the judge read his sentence in Arabic, in stark contrast to his breezy manner Sunday when he winked at his defense team. He had been held without bail at Dubai's al-Rashidiya Police Station since his arrest.

Local media in Dubai reported that Austin was on his way to supermodel Naomi Campbell's birthday bash at the glitzy Burj al-Arab Hotel when he was arrested May 19 at Dubai's airport. Austin's lawyer disputed the report, saying the producer was in Dubai to attend concerts.

Austin has several hits to his credit, including Pink's "Just Like a Pill" and TLC's "Unpretty." He won a Grammy Award for best R&B album in 1999 for producing TLC's multiplatinum "Fanmail."

The songwriter's life story was loosely depicted in the 2002 movie "Drumline."

In 2003, Austin founded the Dallas Austin Foundation, which works to train youth for careers in the music and entertainment industries.