US President Donald Trump was heckled by protesters Thursday as he visited the Supreme Court to pay his respects to the late justice Ruth Bader Ginsburg.

Trump, wearing a black face mask, and First Lady Melania Trump stood silently behind the flag-draped casket of the progressive justice who died last week.

Anti-Trump protesters on the street could be heard shouting "Vote him out" and "Honor her wish" -- a reference to Ginsburg's stated desire that she not be replaced until after a new president is inaugurated.

US President Donald Trump and first lady Melania Trump host the 2020 "Salute to America" on the South Lawn of the White House on July 4, 2020
US President Donald Trump and first lady Melania Trump host the 2020 "Salute to America" on the South Lawn of the White House on July 4, 2020 AFP / SAUL LOEB

Trump is not accustomed to paying his respects to political opponents and his visit to the court is a rare tribute by the Republican president.

Despite Ginsburg's plea and Democratic opposition, Trump is pushing ahead with plans to replace her on the court ahead of the election.

"I think it's going to go very, very quickly," he told Fox Radio on Thursday. "I have five women. I like them all."