Pinch-hitter Joe Mauer hit a go-ahead, three-run homer in the seventh inning, and the Minnesota Twins beat the Detroit Tigers 5-4 on Friday night.

Eddie Rosario and Tyler Austin added solo home runs for Minnesota, which finally broke through against Detroit starter Matt Boyd to win its fourth straight game.

Kyle Gibson (7-9) allowed three runs and eight hits and struck out five in seven innings for the Twins. Taylor Rogers earned his first major league save by striking out Jeimer Candelario with two runners on in the ninth.

Minnesota Twins' Eddie Rosario jogs home on a solo home run off Detroit Tigers pitcher Matthew Boyd in the sixth inning of a baseball game Friday, Aug. 17, 2018, in Minneapolis. (AP PhotoJim Mone)

Minnesota Twins' Eddie Rosario jogs home on a solo home run off Detroit Tigers pitcher Matthew Boyd in the sixth inning of a baseball game Friday, Aug. 17, 2018, in Minneapolis. (AP PhotoJim Mone)

Boyd (7-11) beat Minnesota on Sunday and had not allowed a hit over the previous nine innings until Austin singled to start the fifth on Friday. Boyd stranded Austin, but the Twins finally broke through an inning later.

Rosario homered to break the scoreless streak against Boyd. Austin started a four-run seventh with his second home run in five games for Minnesota, a towering shot that reached the second deck in left-center field.

Jake Cave singled and Boyd hit Johnny Field with a pitch to end his night. Mauer came on to hit against reliever Louis Coleman and pulled a liner over the scoreboard in right-center field. It was the second pinch-hit homer of Mauer's career and the first since May 25, 2009, at the Metrodome.

Detroit Tigers' Victor Martinez hits an RBI-single off Minnesota Twins pitcher Kyle Gibson in the fourth inning of a baseball game Friday, Aug. 17, 2018, in Minneapolis. (AP PhotoJim Mone)

Detroit Tigers' Victor Martinez hits an RBI-single off Minnesota Twins pitcher Kyle Gibson in the fourth inning of a baseball game Friday, Aug. 17, 2018, in Minneapolis. (AP PhotoJim Mone)

Boyd surrendered four runs on four hits in 6 1/3 innings and struck out seven. The Tigers lost their fourth straight game.

Gibson worked his way through troubles with his ability to get ground balls. Detroit had singles in the first three innings only to be erased with a double play. Gibson got four double-play ground balls in the first five innings.

TRAINER'S ROOM

Minnesota Twins pitcher Kyle Gibson, right, covers the plate but Detroit Tigers' Nicholas Castellanos (9) beats the tag to score on a wild pitch by Gibson in the fourth inning of a baseball game Friday, Aug. 17, 2018, in Minneapolis. (AP PhotoJim Mone)

Minnesota Twins pitcher Kyle Gibson, right, covers the plate but Detroit Tigers' Nicholas Castellanos (9) beats the tag to score on a wild pitch by Gibson in the fourth inning of a baseball game Friday, Aug. 17, 2018, in Minneapolis. (AP PhotoJim Mone)

Tigers: Detroit placed left-handed starter Blaine Hardy on the 10-day disabled list with tendinitis in his left elbow. Hardy had been dealing with pain in the elbow and reported issues again Friday in throwing before the game. The move is retroactive to Aug. 15. The team recalled left-hander Ryan Carpenter from Triple-A Toledo. Manager Ron Gardenhire said Carpenter was available, if needed, on Friday, but Carpenter could also start Saturday's game.

Twins: LHP Adalberto Mejia was diagnosed with nerve irritation in his left wrist and he's been shut down from throwing until the issue can be resolved. Mejia (2-0, 2.01 ERA) felt the injury at the end of his last outing, a five-inning, scoreless start on Aug. 7 against Cleveland. He had thrown back-to-back, five-inning outings against the Indians without allowing a run. ... RHP Michael Pineda made his second start with Class A Fort Myers on Thursday, giving up one run on two hits in three innings. Pineda will continue his rehab from Tommy John surgery with three more starts for Triple-A Rochester.

UP NEXT

Minnesota Twins pitcher Kyle Gibson, top, covers the plate but Detroit Tigers' Nicholas Castellanos (9) beats the tag to score on a wild pitch by Gibson in the fourth inning of a baseball game Friday, Aug. 17, 2018, in Minneapolis. (AP PhotoJim Mone)

Minnesota Twins pitcher Kyle Gibson, top, covers the plate but Detroit Tigers' Nicholas Castellanos (9) beats the tag to score on a wild pitch by Gibson in the fourth inning of a baseball game Friday, Aug. 17, 2018, in Minneapolis. (AP PhotoJim Mone)

Carpenter is needed Saturday because right-hander Artie Lewicki was placed on the disabled list with right elbow inflammation. Minnesota will have rookie Kohl Stewart, the fourth-overall pick in the 2013 draft, make his second start in the majors on Saturday. Stewart allowed three runs on eight hits in 4 1/3 innings in a loss to Detroit in his major league debut on Aug. 12.

For more AP baseball coverage: https://apnews.com/tag/MLBbaseball