HOUSTON — Oswald Peraza hit a two-run single in the ninth inning to help the Angels break a three-game losing skid by beating the Houston Astros 4-1 on Saturday night.

Peraza entered the game as a defensive replacement in the seventh inning and hit a bases-loaded fly ball to deep right field that eluded the outstretched glove of Cam Smith. It was the fourth straight hit off Astros closer Bryan Abreu (3-4), who had not surrendered a run in his previous 12 appearances.

The Angels’ third run of the ninth inning scored when Mike Trout walked with the bases loaded.

Kyle Hendricks yielded one run while scattering seven hits over six innings. He held the Astros to one for eight with runners in scoring position, the one hit coming on Jesús Sánchez’s third-inning infield single that scored Jeremy Peña.

Reid Detmers worked around a leadoff walk to keep the Astros (75-61) scoreless in the seventh, and José Fermin (3-2) retired the side in order in the eighth before Kenley Jansen worked a scoreless ninth to earn his 24th save for the Angels (63-72).

Houston’s Spencer Arrighetti struck out a season-high eight batters over 6⅓ innings. The only hit he gave up was Zach Neto’s third-inning solo home run.

Yordan Alvarez had two hits for the Astros, who remained three games ahead of Seattle for first place in the AL West.