BOSTON -- Willians Astudillo had a pinch-hit, tie-breaking RBI single in the seventh inning to lead the visiting Minnesota Twins past the Boston Red Sox 2-1 in the rubber match of a three-game series Thursday.

Astudillo's short liner to right field with the bases loaded was only the team's second hit of the contest, but it was enough for Minnesota to finish 8-2 on its 10-game road trip. The Twins were held to the two hits total but drew a season-high nine walks.

The Red Sox were held to four hits, their only run coming on a Mookie Betts solo home run. Boston fell for the third time in its last five games.

The Red Sox's biggest threat came in the ninth, when Xander Bogaerts singled off Sergio Romo with one out. Taylor Rogers came on and got Bogaerts forced out at second on a Rafael Devers grounder before J.D. Martinez doubled off the wall in left. Eddie Rosario threw Devers out at home from left to end the game, Rogers earning his 24th save.

Andrew Cashner (11-8) took the loss for Boston after walking the bases loaded in the seventh to set up Astudillo's game-winning hit off Matt Barnes with two outs.

The rally made a winner of Twins starter Martin Perez (10-6), who surrendered one run on two hits and two walks with one strikeout.

Perez began his outing with three perfect innings before Betts led off the fourth with a flare down the right field line that bounced off the Pesky Pole for a solo shot. The homer was Betts' third of the series after slugging two in Boston's victory Wednesday.

The Red Sox's lead was short-lived, though, as starter Nathan Eovaldi walked the first three men he faced in the fifth. A run came home when C.J. Cron grounded into a double play to knot the score at one, and Eovaldi got Jonathan Schoop to line out to right to end the threat.

Eovaldi pitched five innings for the first time since returning to Boston's rotation. He gave up one run on one hit and four walks with three strikeouts.