NEW YORK-A US judge has ordered at least two years in prison for rapper Meek Mill for violating probation, a surprisingly harsh verdict that stunned the hip-hop world. Mill, whose most recent album “Wins and Losses” reached number three on the US album chart this year, was sentenced over a case dating from when the 30-year-old was a teenager.

Raised by his mother in Philadelphia after his father was killed, the rapper born as Robert Williams was put on probation after a 2005 arrest on drug and gun possession charges.

At a hearing Monday, Judge Genece E. Brinkley ordered a prison term of two to four years over the long-running case, with eligibility for parole after two years.

Brinkley, according to media reports from the court room, pointed to violations of parole including scheduling concerts in violation of her orders.

He was also freshly arrested after a scuffle in March at the St. Louis airport.

“I gave you break after break, and you basically just thumbed your nose at this court,” Brinkley told Mill, according to local newspaper site

The report said the sentence triggered audible gasps, with prosecutors not having recommended any prison time.

Mill was quoted as pleading for mercy with the judge, saying, “I’m human. I’m not perfect.” The sentence drew outrage from several fellow African American celebrities who said that prison time was disproportionate.