WASHINGTON — President Trump said on Friday that he is considering pardoning Muhammad Ali, a boxing legend who died two years ago and was convicted of refusing to be drafted during the Vietnam War. But it was not immediately clear what Mr. Trump sought to pardon, as Mr. Ali’s conviction was overturned nearly 50 years ago.

“I’m thinking about that very seriously,” Mr. Trump said of the possible pardon before he left Washington on Friday morning for the G-7 financial summit in Canada.

Mr. Ali had fought his conviction all the way to the Supreme Court, which in 1971 granted him the conscientious-objector status he had sought.

Mr. Ali’s attorney, Ron Tweel, said the pardon was not necessary. But he thanked Mr. Trump for the consideration.