President Donald Trump has been booed as he paid respects to late Supreme Court Justice Ruth Bader Ginsburg.

He plans to nominate a replacement this weekend for the liberal justice, best known for her advancement of women’s rights.

The president and first lady Melania Trump — both wearing masks — stood silently at the top of the steps of the court and looked down at Ms Ginsburg’s flag-draped coffin, which was surrounded by white flowers.

Her death has sparked a controversy over the political balance of the court just weeks before the November presidential election.

Moments after Mr Trump arrived, booing could be heard from spectators about a block away from the court building.

They chanted “vote him out” as the president stood near the coffin. Mr Trump walked back into the court as the chants grew louder.

As his motorcade returned to the White House, there were also chants of “Breonna Taylor” from some spectators standing on the pavement.

Their calls came one day after it was announced that a Kentucky grand jury had brought no charges against Louisville police for her killing during a drug raid connected to a suspect who did not live at Ms Taylor’s home.

Mr Trump has called Ms Ginsburg an “amazing woman”.

Her body will lie in state at the Capitol on Friday, the first time a woman receives that distinction, and only the second time it will be bestowed on a Supreme Court justice.

Supreme Court Ginsburg
US President Donald Trump pays his respects (Alex Brandon/Pool/AP)

William Howard Taft, who had also served as president, was also recognized in such a manner.

The body of Rosa Parks, a private citizen and not a government official, previously has lain in honour at the Capitol.

Ms Ginsburg will be buried alongside her husband, Martin, in a private ceremony at Arlington National Cemetery next week. Martin Ginsburg died in 2010.

Meanwhile, the president is expected to announce his nominee to replace Ms Ginsburg on Saturday. He has said he will select from a list of five women.

Republicans are working to move quickly to a confirmation vote, possibly even before the November 3 election.