President Obama and his wife journeyed to the Supreme Court on Friday afternoon to pay their respects to Justice Antonin Scalia, along with other mourners.

The president and first lady entered the court, where Obama shook hands with Chief Justice John G. Roberts Jr. and went to a room out of sight of the press before heading to the Great Hall, where Scalia's casket lay. The two met "privately with some members of Justice Scalia’s family," White House press secretary Josh Earnest said later in a statement.

"The president and Mrs. Obama extended their personal condolences on behalf of the nation, and expressed gratitude for Justice Scalia’s decades of public service,' Earnest said.

The Obamas, both dressed in black, walked slowly into the hall and stood by the casket — flanked by an honor guard of the justice's former clerks —for about a minute. At one point, they clasped their hands and bowed their heads by the casket, which rested on the Lincoln Catafalque. Congress loaned the catafalque to the court for the ceremony.

Afterward they moved on to a 2007 portrait of Scalia by Nelson Shanks that was surrounded by floral arrangements of red, white and blue and bathed in a soft chandelier light.

Some conservatives have criticized the president for not attending Saturday’s funeral Mass for Scalia, but Earnest told reporters Friday that the visit gave Obama an opportunity “to both pay his personal respects to those who loved Justice Scalia but also pay tribute to the outsized impact that he had on the country and on our legal system."