President Donald Trump pardoned black boxing champion Jack Johnson on Thursday, posthumously nullifying his conviction by an all-white jury for an interracial relationship more than 100 years ago.

"He overcame these difficult circumstances to reach the heights of boxing and the boxing world and inspired generations with his tenacity and independent spirit," Trump said. "I believe that Jack Johnson is a very worthy person to receive a full pardon, and in this case, a posthumous pardon, so I am taking this very righteous step, I believe, to correct a wrong that occurred in our history and to honor a truly legendary boxing champion."

Johnson's story was brought to Trump's attention in recent months by actor Sylvester Stallone, who played the scrappy underdog boxer Rocky Balboa in the "Rocky" film series. Trump tweeted in late April that he was considering a full pardon for Johnson.

However, the campaign to pardon Johnson began long before Stallone and was largely pursued for years by Linda Haywood, the fighter's great-great-niece.

"At the end of the day this isn't about Trump, this isn't about the petitions," Haywood, 62, told NBC News in a recent interview from her home in Chicago. "This about history being re-written and righting a wrong and clearing my uncle's name."

Johnson, who reportedly stood at over 6 feet and weighed about 200 pounds, is a legendary figure in boxing. His meteoric rise and controversial prison sentence made him a symbol of racial injustice and led to numerous biographies, films and documentaries of his life over the decades.

He was born in Galveston, Texas, in 1878, the son of former slaves, and from an early age he showed a knack for boxing, often competing in — and winning — underground prizefighting matches across the country.

When he finally made it to mainstream boxing, he was often jeered by white spectators during fights with white challengers, with many hurling racial slurs and death threats at Johnson. However, the taunts never seemed to phase Johnson as he often delighted in humiliating his opponents in the ring.

He was also not coy about flaunting his wealth and his fondness for dating white women, which during America's Jim Crow era was illegal and tantamount to a death sentence.

Screenwriter and author John Ridley once called Johnson "a guy who basically lived his life with a metaphorical middle finger raised in the air."

Though Johnson's boxing profile grew as he notched more wins, many white boxers still refused to fight him.

There was a quest for "the great white hope" who would eventually defeat Johnson. In 1908, at age 30, he became the first black boxer to win the world heavyweight title when he defeated the Australian Tommy Burns, the reigning champion.

But it was his 1910 bout against Jim Jeffries, a white boxer who held the heavyweight title before Burns, that arguably sealed Johnson's legacy as a boxing champion. It was dubbed the "Fight of the Century," with more than 22,000 spectators turning out for the contest in Reno, Nevada. Johnson defeated Jeffries in the 15th round.

However, two years later he was convicted under the White Slave Traffic Act, also known as the Mann Act, for crossing state lines with his white girlfriend, Lucille Cameron.

Johnson fled the United States and spent time in Europe to avoid prison, but in 1920 he returned to the United States and agreed to surrender. He spent nearly a year behind bars. After his release, he was never able to bounce back and lost much of his fortune, according to Haywood, his niece.

He died in 1946, at age 68, in a car crash near Raleigh, North Carolina.

"The search for the 'white hope' not having been successful, prejudices were being piled up against me, and certain unfair persons, piqued because I was champion, decided if they could not get me one way they would another," Johnson once said, according to the PBS documentary "Unforgivable Blackness."

Jack Johnson, New York, 1932. He was 54. AP file

Haywood said for years her family was ashamed because they viewed the conviction as an unjust stain on his legacy.

"It wasn't a secret," she said. "They were just very ashamed that he was incarcerated for something he didn't do."

She added: "We always knew that he was unfairly convicted, and it was a lot of people who were very distraught. At the time the family was powerless and voiceless and when the white man tells you that's the way it is, what can you do?"

Johnson's story was adapted into the 1967 play "The Great White Hope," starring James Earl Jones and Jane Alexander, and made into a film in 1970. The play won the Pulitzer Prize for drama and Tony Award for best play in 1969. The film was nominated for multiple Academy Awards, including best acting for Jones and Alexander.

Haywood told NBC News that at the time the family strongly objected to how Jackson's likeness and life story were portrayed in the movie, calling it misleading.

Johnson's life story was also the basis for the documentary "Unforgivable Blackness: The Rise and Fall of Jack Johnson," directed by Ken Burns and aired on PBS in 2004. Haywood said it was a more accurate portrayal of her uncle's life.

President Donald Trump posthumously pardons Jack Johnson, boxing's first black heavyweight champion, on Thursday. Susan Walsh / AP

Haywood led the charge to clear her uncle's name with speeches, petitions and even worked to push Presidents George W. Bush and Barack Obama to pardon her uncle.

Her efforts received support from lawmakers on both sides of the aisle, including Sen. John McCain, R-Ariz., who has pushed for a pardon since 2004.

McCain, a life-long boxing fan, applauded the decision in a statement on Thursday.

"For years, Congress has overwhelmingly supported legislation calling on multiple U.S. presidents to right this historical wrong and restore this great athlete's legacy," McCain said. "President Trump's action today finally closes a shameful chapter in our nation’s history and marks a milestone that the American people can and should be proud of.”

Haywood said her uncle would be happy with her yearslong effort to right an injustice.

"I know he would be proud," she said. "He's in heaven looking down, and he's smiling."