U.S. Supreme Court Justice Sonia Sotomayor told a crowd in St. Paul on Monday night that civic education was crucial to a strong democracy as she celebrated the opening of a new educational exhibit.

"In order to preserve our democracy, we must all commit to teaching our children about the importance of law and an independent judiciary," she said in remarks at the Warren E. Burger Federal Building and U.S. Courthouse.

Sotomayor spoke at a private reception to commemorate the opening of a Justice and Democracy Center at the courthouse, an exhibit designed to teach the public about the foundations of the U.S. government and the rule of law.

Earlier in the evening, Sotomayor spoke to a group of schoolchildren who toured the new center.

In her remarks, she invoked the famous quote from Benjamin Franklin — that the then-new United States would remain "a republic, if you could keep it" — in urging more efforts to teach the public about rights guaranteed by law and the role of the courts.

Her comments were short and largely did not mention this year's court term, which saw several controversial rulings where Sotomayor was not in the majority, including one that greatly expanded presidential immunity from prosecution. In a dissent, she wrote that a president could not be "a king above the law."

She did joke, however, about failing an online educational tool designed to show users how to win the White House.

"Maybe that's why I dissent so much," she said.