NEW YORK (AP) — Freddie Freeman hit a two-run homer in the 10th inning, and the Los Angeles Dodgers snapped a five-game losing streak by defeating the New York Mets 5-2 on Tuesday in the opener of a doubleheader.

Los Angeles trailed 2-0 before Freeman hit an RBI single in the eighth and Chris Taylor drove in Teoscar Hernández with a well-placed bunt in the ninth against Adam Ottavino.

Mookie Betts opened the 10th with an RBI single against Jorge López, driving in automatic runner Andy Pages. After Shohei Ohtani struck out swinging, Freeman hit a drive to right for his sixth homer.

Daniel Hudson (2-1) got the win, escaping a bases-loaded, one-out jam in the ninth. Blake Treinen pitched a perfect 10th for his first save since 2021.

Los Angeles’ five-game slide was the team’s longest streak since it dropped six in a row in April 2019.

New York wasted a stellar performance by Tylor Megill, who struck out nine while pitching seven innings of three-hit ball. The Mets have dropped six of seven.

Left-hander Jose Quintana is scheduled to start the second game for New York against Los Angeles right-hander Gavin Stone.