(CNN) Meek Mill was arrested for popping wheelies on his dirt bike and for getting into a fight earlier this year, and now the rapper could spend two to four years in state prison because those arrests violated his probation from a 2008 gun and drug case.

But the case has moved beyond the Pennsylvania courtroom. Many hip-hop artists including Jay Z, T.I., Rick Ross and Nipsey Hussle have rallied behind the rapper, and his sentence sparked a new debate about criminal justice reform.

Mill was also sentenced one day before Philadelphia elected Larry Krasner, a progressive Democrat and civil rights attorney who vowed a "movement" for criminal justice reform, to be its next district attorney.

Mill's attorney told CNN that he plans to appeal the sentence and accused Philadelphia judge Genece E. Brinkley, who has overseen Mill's case for years, of being "enamored" with the rapper and taking "a personal interest in the case."

"(Meek's) frustrated, really frustrated and knows he's being treated different than anyone else," Mill's attorney Joe Tacopina told CNN in a phone interview Thursday. "If his name was John Smith, he wouldn't be in jail and he certainly wouldn't be on probation."

"He's been on probation for nearly 10 years. Nobody goes on probation for 10 years," Tacopina added. He criticized Brinkley for extending Mill's initial five-year probation sentence following various violations.

Brinkley's office did not respond to a request for comment, but referred CNN's request to Gabriel Roberts, a spokesman for the First Judicial District of Pennsylvania. He told CNN in a phone interview Thursday that "because this matter is subject to future litigation, there will be no comment at this time."

The sentence handed down by the Judge ... is unjust and heavy handed. Jay Z

Mill is signed to Jay Z's label Roc Nation. The label urged fans of the rapper to sign the Change.org petition addressed to Pennsylvania Gov. Tom Wolf asking the state to reevaluate his sentence.

In a statement provided to CNN by Roc Nation on Thursday, Jay Z slammed the sentence, calling it "unjust and heavy handed."

"The sentence handed down by the judge -- against the recommendation of the assistant district attorney and probation officer -- is unjust and heavy handed," he said. "We will always stand by and support Meek Mill, both as he attempts to right this wrongful sentence and then in returning to his musical career."

Sign the petition to overturn the blatant injustice on @Change #Justice4Meek https://t.co/RrM651vrXl ✊🏽✊🏽✊🏽✊🏽We wit u young King. Stay Up. This too shall pass. pic.twitter.com/APXMRoEZfZ — T.I. (@Tip) November 9, 2017

Jay Z also voiced his support for Mill at his 4:44 show in Dallas on Tuesday.

"I gotta say something about a young man named Meek Mill," Jay Z said. "He caught a charge, he was about 19, he's 30 now, he's been on probation 11 years. F------ 11 years. Now he got to do two to four years because he got arrested being on a bike popping a f------ wheelie."

A post shared by TIP (@troubleman31) on Nov 9, 2017 at 9:58pm PST

T.I., who shared a message of encouragement for Mill, criticized the sentence in several posts and shared this meme on Instagram, including a picture of a dumbfounded Will Smith: "When you realize Meek got more jail time for riding a dirt bike than a cop would for shooting an unarmed African American."

To be yung Blac and successful YOU ENEMY NUMBER 1. HOLD YO HEAD @MeekMill streets chose u💪🏽🏁 — THA GREAT (@NipseyHussle) November 6, 2017

"To be yung Blac and successful YOU ENEMY NUMBER 1. HOLD YO HEAD @MeekMill streets chose u," Nipsey Hussle, who has worked with Mill, tweeted.

What happened

Mill's first arrest this year came in March after he was involved in a fight at a St. Louis airport and the second came in August when he was arrested in New York for reckless endangerment for popping wheelies on his dirt bike and not wearing a helmet.

The rapper appeared in court on Monday after the pair of arrests and was sentenced to two to four years in state prison by Brinkley, who cited a failed drug test and the rapper's noncompliance with a court order restricting his travel.

We go to war for our freedom ... they say we equal .... i used to wanna play i like Randall and be a Eagle .... i used to play the quarterback my homie would go receiver ... that was until the football got flattened by a dope needle ... on the pavement A post shared by Meek Mill (@meekmill) on Nov 6, 2017 at 9:41am PST

"I'm human. I'm not perfect," Mill said ahead of his sentencing, according to a report from Philly.com . "I'm asking for mercy. You gave me the ladder to do what I have to do to prevail in my struggle. I made it this far, I can't really go back and start over."

But Brinkley, who sentenced Meek to 90 days of house arrest after a February 2016 probation violation, wasn't convinced.

"I gave you break after break, and you basically just thumbed your nose at this court," she said.

Tacopina said Brinkley went against the recommendations of the district attorney and Mill's probation officer, who recommended "no incarceration for technical violations," and accused Brinkley of "taking an inappropriate personal interest in (Meek Mill) that goes above and beyond her role as a judge."

Tacopina called Brinkley's behavior "a little stalkerish," alleging that she showed up at Mill's "community service for the homeless" last year and "watched him do community service."

He also alleged in an interview with Billboard earlier this week that Brinkley is "infatuated" with Mill and has requested that he leave Roc Nation to sign with a friend of hers and asked the rapper to record a Boyz II Men song in a tribute to her.

How it started

The Philadelphia native, whose full name is Robert Rihmeek Williams, is now 30 and was first arrested when he was 18 for illegally carrying a gun while walking to a corner store. In 2008 he was convicted on gun and drug charges stemming from this arrest and he spent eight months in prison and was sentenced to five years probation.

This arrest has not only influenced the rapper's work as illustrated by his lyrics, most recently in his 2017 album "Win and Losses," but has also haunted him in life as his probation lingered.

In the 2012 hit, "Dreams and Nightmares," Mill reflects on living in poverty, his incarceration and chronicles his rise to the top of the hip-hop world before unleashing into an angry tirade in the second part of the song about the darker side of fame.

After "Dreams and Nightmares" debuted at No. 2 on the Billboard 200 chart, the rapper gained national recognition and his career hit a new high.

But in 2014 Mill violated the terms of his probation by performing outside Pennsylvania and went back to prison for five months; he told Billboard he spent much of that time in solitary confinement. He was released in December 2014 , and Brinkley reinstated his probation conditions.

In "Dreams and Nightmares," Mill reflects on having big dreams as a teenager as handcuffs were placed on his wrists: "I used to pray for times like this, to rhyme like this ... In the back of the paddy wagon, cuffs locked on wrists."

And in the second part of the song he describes the elation he felt when those cuffs were replaced by a Rolex watch:

"It was somethin' about that Rollie when it first touched my wrist/ Had me feelin' like that dope boy when he first touched that brick."

On Monday the rapper took off his gold watch, handed it to his lawyer, and was placed in handcuffs again — a scene that was recounted by a Philly.com report.

Mill began his third prison sentence on Wednesday.

Tacopina said that he plans to "make a motion for (Brinkley) to reconsider" the sentence in the "next day or so," calling it "basically wasting paper" but said he has to do it before he can formally appeal the sentence.

Asked whether the rapper blames the judge or the criminal justice system for his most recent sentence, Tacopina said, "It's primarily this judge, but he's in a system that allows for this to happen, and there should be some swift resolution for him."