SAN FRANCISCO — A federal judge has barred prosecutors from introducing evidence picked up by recording devices planted outside the San Mateo County courthouse without a warrant.

In a 19-page decision issued Monday, U.S. District Judge Charles Breyer found that federal investigators had “utterly failed to justify” a warrantless surveillance program which picked up more than 200 hours of recordings, including at least one private conversation between a judge and a prosecutor.