DETROIT (AP) — Willi Castro and Akil Baddoo scored on third baseman Ke’Bryan Hayes’ two-out error during Detroit’s three-run fifth inning, and the Tigers edged the Pittsburgh Pirates 3-2 in the first game of a doubleheader.

The Tigers finished with just three hits, but they scored three unearned runs on their way to their second victory in nine games.

Alex Lange got two outs for the win, and Gregory Soto worked the ninth for his fourth save.

The Pirates lost for the sixth time in seven games.