The Supreme Court on Thursday upheld the search of a police officer’s personal, sometimes sexually explicit, messages on a government-owned pager, saying it did not violate his constitutional rights.

The Court was unanimous in reversing a federal appeals court ruling that sided with the Ontario, Calif., SWAT team officer.