In 2003, 24-year-old machinist Juan Catalan faced the death penalty for allegedly shooting a key witness in a murder case. Catalan told police that he couldn’t have committed the crime—he was at a Los Angeles Dodgers game at the time. He had the ticket stubs and everything!

When police didn’t buy his alibi, Catalan contacted the Dodgers, who pointed him to an unlikely hero: misanthropic comedian Larry David. On the day in question, David had been filming an episode of Curb Your Enthusiasm in Dodger Stadium. It was a long shot, but maybe Catalan could be seen in the background. When his attorney watched the outtakes, it took just 20 minutes to find shots of Catalan and his daughter chowing down on ballpark dogs while watching from the stands.

Thanks to the footage, Catalan walked free after five months behind bars. And Larry David found one more thing to be self-deprecating about. “I tell people that I’ve done one decent thing in my life, albeit inadvertently,” joked David.

This story originally appeared in our list of The 25 Most Powerful TV Shows of the Last 25 Years.