The Twins watched a four-run lead disappear and saw one of their most reliable relievers, Griffin Jax, unravel in their final game against the Tigers this season.

Fittingly, the Twins' yearlong struggles against Detroit ended with an 8-7 loss Wednesday at Target Field. Attempting to protect a one-run lead in the seventh inning, Jax surrendered a game-tying triple to Riley Greene and back-to-back homers to Spencer Torkelson and Kerry Carpenter.

The Twins lost eight of their 13 games to the Tigers, dropping the season series for the first time since 2016.

Jax, before Wednesday, had surrendered two homers all season and four runs in his last 31 relief appearances. The Tigers matched those numbers in the span of five batters.

"I just feel like I'm not locating where I need," Jax said. "When you're leaving pitches middle, it doesn't matter who you are facing. Big league hitters are going to do damage on it."

Akil Baddoo started the seventh-inning rally against Jax with a leadoff walk. Greene, who finished a double shy of the cycle, followed with a triple off the center-field wall. Greene scored the go-ahead run on a groundout with the infield drawn in. Then Torkelson and Carpenter both thumped sliders to left field for solo homers.

"When I'm getting weak singles, I can live with that," Jax said. "When I'm getting beat, that's what kind of eats at me a little bit."

The top five hitters in the Tigers lineup combined for 10 hits in 20 at-bats with three walks and eight runs. Torkelson homered twice, his second multihomer game against the Twins in the past week.

"My God, those guys, I'm finished with them," Twins manager Rocco Baldelli said of Greene and Torkelson. "I mean that. We'll see them again next year, and that'll be OK with me."

The Twins trailed by four runs entering the bottom of the ninth inning, and Matt Wallner came within a few feet of what would have been a two-run, walk-off homer. After Edouard Julien opened the inning with a single, his fourth hit of the afternoon, Jorge Polanco homered to the batter's eye in center field. Three pitches later, Max Kepler lined a solo home run to right field.

It was the ninth set of back-to-back homers from the Twins this season, and Royce Lewis continued the hit parade with a single to center. Tigers reliever Jason Foley escaped the jam when Wallner flew out to the warning track in left field and Donovan Solano grounded into a game-ending double play.

"Our offense has been like that at times," Baldelli said. "Even if we have three or four innings where it doesn't look so hot, all of a sudden, we kind of catch it, we find something we're looking for and we stack some good at-bats and we hit some balls good. We'll take that, but we needed more."

Twins starter Kenta Maeda never settled into a rhythm as he faced the Tigers for his second start in a row. He threw at least 17 pitches in each of his four innings, including a 26-pitch first inning.

All the damage against him came in a three-run third inning. Baddoo hit a soft single on a low changeup before Greene crushed a mammoth two-run homer to center field, a 448-foot rocket in a two-strike count. Two batters later, Torkelson teed off on a first-pitch curveball and the ball sailed to the second deck in left field.

"I think [the Tigers] have a really good understanding of how our pitchers pitch and how our hitters hit," Maeda said through an interpreter.

The Twins staked Maeda to a 4-0 lead in the second inning. They had four consecutive hits against Tigers righthander Reese Olson, who pitched six scoreless innings against them last week, which included a two-run single from Julien.

Still, there were plenty of missed opportunities. Julien was picked off first base in the first inning when he misread a ball in the dirt. Lewis and Wallner opened the third inning with back-to-back singles, but they failed to score after a shallow flyout and two strikeouts.

After the Twins loaded the bases in the fourth inning, Detroit's bullpen retired 12 straight batters.