Rapper Lil Wayne thanked former President Donald Trump for pardoning him in one of his final acts before leaving the White House.

Trump issued a number of pardons and sentence commutations early Wednesday as he prepared to leave the presidency. Among them was Wayne -- real name Dwayne Michael Carter Jr. -- who was facing a weapons charge.

The artist took to Twitter on Thursday, writing: "I want to thank President Trump for recognizing that I have so much more to give to my family, my art, and my community."

The 38-year-old Grammy-winner also thanked his attorney, "I also want to thank @bradfordcohen for working so diligently to secure another chance for me. Love! - Dwayne Michael Carter Jr."

DONALD TRUMP PARDONS, COMMUTES LIL WAYNE, KODAK BLACK SENTENCES PROMPTING REACTIONS FROM FANS AND CRITICS

Wayne was charged in Florida on Nov. 17 with possession of a firearm by a convicted felon, a federal offense that carries a potential sentence of up to 10 years in prison. 

LIL WAYNE PLEADS GUILTY TO FEDERAL GUN CHARGE IN FLORIDA STEMMING FROM 2019 INCIDENT

"Mr. Carter pled guilty to possession of a firearm and ammunition by a convicted felon, owing to a conviction over 10 years ago," the White House said. "Deion Sanders, who...wrote in support of this pardon, calls Mr. Wayne 'a provider for his family, a friend to many, a man of faith, a natural giver to the less fortunate, a waymaker, [and] a game changer.'" 

LIL WAYNE REVEALS 'GREAT MEETING' WITH TRUMP, PROMPTING TWITTER USERS TO RESPOND

The pardon comes months after Wayne outraged some of his fans by making nice with Trump ahead of the November election. On Oct. 29, Wayne shared a picture of himself smiling next to Trump after meeting with him about his administration’s "Platinum Plan," designed to create jobs and opportunities in the Black community. 

Rapper Lil Wayne -- real name Dwayne Michael Carter Jr -- was facing a weapons charge. 

Rapper Lil Wayne -- real name Dwayne Michael Carter Jr -- was facing a weapons charge.  (Getty)

CLICK HERE TO SIGN UP FOR OUR ENTERTAINMENT NEWSLETTER

Fellow rapper Kodak Black, who was serving time for weapons charges, was also on Trump’s list of people who received a sentence commutation. The 23-year-old Black -- real name Bill K. Kapri -- shared a note of gratitude as well on Wednesday. 

Bradford Cohen, who worked with both Black and Wayne, told Fox News he is "glad" for his clients.

CLICK HERE TO GET THE FOX NEWS APP

"I think President Trump and his administration have been tireless advocates on behalf of the African-American community. These pardons are a perfect example of this administration following up on its reforms and commitments. I thank President Trump for his advocacy towards justice reform.I am glad for both my clients," Cohen told us.

Fox News' Tyler McCarthy and The Associated Press contributed to this report