Updated

President Trump on Thursday granted a posthumous pardon to Jack Johnson, boxing's first black heavyweight champion, after being urged to do so by “Rocky” star Sylvester Stallone.

"It's my honor to do it. It's about time," Trump said during an Oval Office ceremony.

Johnson, born in Galveston, Texas, was the target of racial resentment, particularly after he defeated white boxer James Jeffries in the 1910 “Fight of the Century,” a bout that sparked race riots.

Three years later, he was convicted by an all-white jury of violating the Mann Act, which made it illegal to transport a woman across state lines for “immoral” purposes.

In their efforts to prosecute Johnson, authorities first targeted Johnson's relationship with the woman in question, Lucille Cameron, who later became his wife, but she refused to cooperate.

But they found another white witness, Belle Schreiber, to testify against him. Johnson fled the country after his conviction, but he agreed years later to return and serve a 10-month jail sentence. He died in 1946.

Sen. John McCain, R-Ariz., has been calling for a pardon for Johnson since 2004, and criticized President Barack Obama for leaving office in 2017 without having granted one. Former Senate Majority Leader Harry Reid, D-Nev., had also called for a pardon.

“Johnson’s imprisonment forced him into the shadows of bigotry and prejudice, and continues to stand as a shameful stain on our nation’s history,” McCain said in a statement in January 2017.

Stallone, as well as Johnson’s great-great niece, had urged Trump to pardon him and in April Trump said that Stallone had called him about it.

“[Johnson's] trials and tribulations were great, his life complex and controversial,” Trump tweeted. “Others have looked at this over the years, most thought it would be done, but yes, I am considering a Full Pardon!”

Stallone was in the Oval Office as a guest when Trump pardoned Johnson on Thursday, as was boxer Lennox Lewis.

Filmmaker Ken Burns, who was part of an effort to pardon Johnson, welcomed the move and called it "the right thing to do.

"I’m just so happy that Senator John McCain, who has led our efforts to achieve a posthumous pardon for Jack Johnson, has lived to witness this moment," he said in a statement. "The pardon announced today helps correct an injustice experienced by Jack Johnson. But it also reminds us of a racist past and how even today racist remarks and coded words are used to imperil African Americans, especially Black men, and to advance an Un-American agenda.”

Posthumous pardons are rare, but not unprecedented. President Bill Clinton pardoned Henry O. Flipper, the first African-American officer to lead the Buffalo Soldiers of the 10th Cavalry Regiment; he was framed for embezzlement. President George W. Bush in 2008 pardoned Charles Winters, an American volunteer in the Arab-Israeli War convicted of violating the U.S. Neutrality Acts in 1949.

The Associated Press contributed to this report.