Brooks Lee struck out in each of his first three at-bats and committed an error that led to a run Thursday.

"I felt horrible for the first eight innings, to be honest," said Lee, who showed all can be forgiven with one swing.

Lee, batting with the score tied and two out in the eighth inning, laced an elevated fastball against Orioles lefthander Gregory Soto into left-center field for a two-run double. The Twins dugout erupted with cheers, and Lee let out a long yell as he stood on second base.

After Bailey Ober stranded eight runners in five innings, Byron Buxton threw out a runner at the plate and the Twins offense logged only three hits through the first seven innings, Lee delivered the go-ahead hit in a 5-2 victory to complete a three-game sweep over Baltimore at Target Field.

The Twins have won five consecutive games and 11 of their past 16.

"That was a dogfight-type of a game," Twins manager Rocco Baldelli said. "There was not a lot that came easy to us. I think it showed a real toughness in a lot of different ways."

Lee entered with seven strikeouts through 22 games before Orioles starter Dean Kremer punched him out three times. All series, Lee said, Baltimore pitchers fed him a heavy diet of offspeed pitches.

In the eighth inning, Harrison Bader and Buxton drew walks against former Twins reliever Yennier Cano. Soto entered and struck out Trevor Larnach, who had hit a tying solo homer off Kremer in the sixth inning, before Lee drove his clutch hit to the wall in a 1-2 count. Two pitches afterward, Ty France added an RBI single, his third hit of the game.

"I just tried to keep my composure," Lee said. "I have to thank my teammates — Bader, Buxton, [Matt] Wallner, he's not even playing, he's on the [injured list] — for telling me to keep my head up and stay focused."

Ober surrendered eight hits and a walk in five innings, but he saved his best pitches for whenever runners were in scoring position. After giving up a run in the second inning, he struck out two batters with baserunners on second and third.

The Orioles scored a run on a sacrifice fly in the third inning after Lee, playing second base, committed an error on a potential double-play grounder, the ball skipping off his glove. But for the second consecutive inning, Ober responded with back-to-back strikeouts to leave two runners on base.

Subscribe to the Twins' Extra Innings newsletter here

"It was definitely a grindy one," said Ober, whose start was moved up a day because Joe Ryan was sick. "I'm pretty tired right now."

After Baltimore collected back-to-back singles to open the fourth inning, from the bottom two hitters in the lineup, Ober struck out Gunnar Henderson on an elevated fastball and induced a double play against former No. 1 overall pick Jackson Holliday. Ober pumped his fist twice while letting out a yell.

Ober worked his magic again in the fifth inning after it started with a hit batsman and a double. Ober induced a foul popout to the catcher, struck out Heston Kjerstad on three pitches and ended the inning with a groundout.

Orioles batters "were late with the fastball," catcher Christian Vázquez said. "It was huge he could elevate the fastball and get some swing and miss there."

It was Buxton's turn to save a run in the sixth inning. Cole Sands, who gave up a leadoff double to Emmanuel Rivera, watched Henderson line a single to center field. Buxton fired a one-hop throw to Vázquez, nabbing a sliding Rivera.

"You've got to make a perfect throw from 250 feet away, as quickly as you can," Baldelli said. "It's not something you put past him. You're not shocked when he does it, I'll tell you that. On top of his legs and how those move, his arm moves like that too."

Buxton helped the Twins to a 1-0 lead in the first inning. He drew a leadoff walk, swiped second base and scored when France hit a two-out RBI single to right.

BOXSCORE: Twins 5, Baltimore 2

MLB standings

Buxton had walked five times all season before his two walks Thursday. After scoring six runs in the past four games, he ranks second in the AL with 29 runs behind only Aaron Judge's 34.

The Twins had only two hits between France's first-inning single and Lee's eighth-inning double.

"I saw three hits before I went up," Lee said. "I was like, 'Wow, we're still in this ballgame.' That's what good defense and good pitching does. We're staying in every game. If we continue to do that, we're going to win a lot of games."