MINNEAPOLIS (AP)The basics of hitting and scoring have been a persistent difficulty for Detroit this season.

With a few big swings, one of the least productive lineups in baseball helped the Tigers avoid another sweep in Minnesota.

Jeimer Candelario hit the tiebreaking two-run homer in the 10th inning after Harold Castro went deep twice earlier, and the Tigers came back to beat the Twins 4-2 on Wednesday.

”It’s always nice to have a happy flight. I’m doing everything I can to contribute and help the team win. I know it’s going to turn in our favor,” said Candelario, who knocked a first-pitch fastball from Trevor Megill (0-1) into the grass berm behind center field.

The ball went just beyond the reach of Gilberto Celestino’s glove to drive in the automatic runner and give the Tigers their first lead of the series, and Celestino was upset he couldn’t catch it.

”He took that pretty personal,” said regular Twins center fielder Byron Buxton, who took a turn as designated hitter and mentor to Celestino. ”I just kind of had to calm him down a little bit.”

The Twins, who had their six-game winning streak stopped, loaded the bases with no outs in the bottom half. Michael Fulmer struck out Carlos Correa before yielding to Andrew Chafin, who struck out Max Kepler and retired Gary Sanchez on a foul pop for his first save this season.

Castro hit solo home runs in the sixth and eighth innings, after going deep only nine times in his first 799 major league at-bats. His first homer, off Twins starter Dylan Bundy, stopped a 16-inning scoreless streak for the Tigers, who have only 25 home runs in 43 games for the fewest in baseball.

After a 54-minute delay to let the rain pass through, Bundy threw his first of 85 pitches and lasted until there were two outs in the sixth. Bundy had six strikeouts and allowed five hits and one walk, a step forward in his second appearance since being sidelined by COVID-19.

Trevor Larnach hit a two-run homer for the Twins in the fourth inning to spoil an otherwise-stellar fill-in start by Rony Garcia that was pieced together by his fellow relievers. Garcia finished the fourth, with three hits and two walks allowed. He had five strikeouts.

”Bullpen games are exciting, because you get to use a lot of guys, but they’re also costly because we have another 12 games until we have our next day off,” manager A.J. Hinch said.

The myriad injuries in the rotation made this bullpen game necessary for the Tigers, but it also served as another showcase of their greatest strength. With the starting pitching depleted and the hitting badly lagging, the relievers entered the game with a collective 2.98 ERA for the second-best mark in baseball. Wily Peralta, Joe Jimenez, Gregory Soto and Alex Lange (1-1) kept the Twins off the board after Garcia departed.

The Tigers improved to 8-15 this month, their 54 runs in May by far a major league low. Their OPS of .584 is also the worst in baseball this month.

HUSTLING HILL

Derek Hill tried to hustle the Tigers to their first run, when he legged out an infield single to deep shortstop, stole second base and advanced to third on a groundout.

When Bundy’s curveball bounced in the dirt and skipped to the right of the catcher Sanchez, Hill aggressively raced home. Sanchez whirled around and attempted to apply the tag as Hill contorted his body to try to dodge the glove and touch the plate while inadvertently tripping home plate umpire Charlie Ramos in the process. The close call was out, upheld by the replay review after a challenge by the Tigers.

”We’re just trying to score runs. We are not in the luxury of being able to be perfect and have roles in the bullpen and sit back and wait for the big hit. This has not been an easy stretch,” Hinch said.

TRAINER’S ROOM

Tigers: RF Robbie Grossman, who’s in a 4-for-55 slump with 20 strikeouts and only seven walks over his last 15 games, was on the bench. ”He deserves a mental break,” Hinch said. Grossman entered in the ninth for defense.

Twins: 2B Jorge Polanco rested for the second straight game because of soreness in his right ankle, which he cleanup surgery on after the 2019 and 2020 seasons. The cautionary handling of Polanco’s condition could include an additional day off, manager Rocco Baldelli conceded. ”Nothing more than mild concern,” Baldelli said.

UP NEXT

Tigers: LHP Tarik Skubal (3-2, 2.22 ERA) takes the mound on Thursday night to begin a four-game series at home against Cleveland, after getting an extra day between starts to rest a bruised shin. RHP Aaron Civale (2-3, 7.84 ERA) pitches for the Guardians.

Twins: LHP Devin Smeltzer (1-0, 1.74 ERA) starts a four-game series on Thursday night against Kansas City, after being called up from Triple-A to sub for Joe Ryan, who went on the COVID-19 list. LHP Daniel Lynch (2-3, 4.01 ERA) takes the mound for the Royals.

More AP MLB coverage: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports