Matt Blewett-USA TODAY Sports

Kyle Farmer drove in the winning run with a bases-loaded single in the bottom of the 10th inning as the Minnesota Twins rallied for a 3-2 victory over the Houston Astros on Friday afternoon in Minneapolis.

Farmer grounded a 1-1 fastball by Houston reliver Ryne Stanek (1-1) up the middle against a drawn-in infield to drive in Trevor Larnach for his second career walk-off hit and first since 2017.

The Twins, who snapped a two-game losing streak, were trailing 2-1 entering the bottom of the 10th with Byron Buxton at second as the designated runner. After Buxton advanced to third on Stanek's wild pitch, Larnach walked and Jose Miranda then lined a single to right to drive in Buxton with tying run.

Larnach and Miranda both advanced on a wild pitch to Donovan Solano, who was then intentionally walked to load the bases and set the stage for Farmer's game-winning hit.

Miranda finished with 3-for-5 with an RBI, Solano and Buxton each had two hits and scored a run, and Michael Taylor had a double among two hits for the Twins. Jorge Lopez (1-0) picked up the win.

Mauricio Dubon went 2-for-4 with a double, an RBI and run scored, and Kyle Tucker also had a double for Houston, which had a six-game win streak against Minnesota snapped.

Houston took a 1-0 lead in the third inning when Dubon led off with a double to right, was sacrificed to third by Martin Maldonado and scored one out later on Alex Bregman's single.

Minnesota, which left the bases loaded in the fourth and wasted Taylor's leadoff double in the fifth, tied it, 1-1, in the sixth. Solano singled with one out, went to second on Farmer's single, advanced to third on a fielder's choice by Nick Gordon and then scored on a wild pitch by Astros reliever Bryan Abreu.

David Hensley began the 10th as the designated runner at second and advanced to third on a groundout to second by Chas McCormick. With the infield in, Dubon then bounced a grounder into the hole and under the glove of shortstop Carlos Correa to drive in Hensley and give Houston a 2-1 lead.

Twins starter Sonny Gray struck out a career-high 13 batters before departing after seven innings. Gray allowed one run on four hits, walked one and threw 98 pitches, 61 for strikes. The 13 strikeouts were the most by a Twins pitcher since Francisco Liriano struck out 15 on July 13, 2012.

Gray, who struck out the side in both the fourth and fifth innings and struck out five in a row during one stretch, became the fifth pitcher since 2017 to strike out at least 12 Astros in a game, joining Shohei Ohtani (twice), Trevor Bauer, Gerrit Cole and Lance Lynn.

More must-reads:

TODAY'S BEST
Celtics finally put away undermanned Cavaliers, advance to conference finals
Steelers to make history in final two months of 2024 season
Steelers veteran reportedly plans to sit out OTAs
Padres pitcher has honest reaction to team getting booed off the field
MLB announces punishment for Astros' Ronel Blanco over foreign substance
Athletics place lefty on 15-day IL, transfer infielder to 60-day
Rafael Nadal switches gears, gives major update on French Open status
Atlanta to be first race of NASCAR's In-Season Tournament
West Point alum made history in his MLB debut with Reds
Heat legend cautions Lakers against hiring JJ Redick
Welcome to the WNBA: Caitlin Clark sets infamous record in debut
Jalen Brunson leads Knicks to blowout win in Game 5 vs. Pacers
Nikola Jokic torches DPOY to lead Nuggets past Wolves in Game 5
Oilers use late heroics to tie Canucks at two games each
Watch: Astros pitcher ejected after foreign substance check
Kirk Cousins not angry with Falcons because winning is 'hard enough'
Bronny James has surprising comments on potentially teaming up with LeBron
Bills add two-time Super Bowl champ to new-look WR room
Brewers lose team-leading home run hitter to injured list
Sandy Alderson denies involvement in Mets, Billy Eppler IL controversy