Then the Marbury v. Madison case came before the Supreme Court. William Marbury was the last judge appointed by Adams, but Jefferson ordered James Madison not to deliver the documents that would make the appointment official.
Marbury sued Madison.
By the law of the time, only the Supreme Court could rule on a case involving a federal official. The Court ruled against Marbury, with Marshall saying that the Constitution did not give the Court the power to make such a ruling.
This ruling established judicial review, or the authority of the Supreme Court to strike down laws that it found unconstitutional.