Eddie Rosario hit a tiebreaking homer in the eighth inning and the Minnesota Twins scored all of their runs with longballs, beating the Detroit Tigers 5-4 Sunday.

Max Kepler and Jake Cave had two-run homers as the Twins won for the fifth time in six games.

Behind in the count 0-2 after two swings-and-misses to lead off the inning, Rosario launched the third fastball he saw from Alex Wilson (1-4) into the right field seats for his 22nd home run.

Minnesota Twins' Eddie Rosario runs toward third base after hitting a home run against the Detroit Tigers in the eighth inning of a baseball game Sunday Aug. 19, 2018, in Minneapolis. (AP PhotoStacy Bengs)

Minnesota Twins' Eddie Rosario runs toward third base after hitting a home run against the Detroit Tigers in the eighth inning of a baseball game Sunday Aug. 19, 2018, in Minneapolis. (AP PhotoStacy Bengs)

Trevor Hildenberger (3-3) relieved Taylor Rogers in the eighth and got James McCann on a grounder with two on to end the inning. He worked a scoreless ninth despite pinch-hitter Victor Reyes' leadoff single and a walk to Jose Iglesias to complete the outing.

Minnesota led 4-1 after the fourth-inning homers by Kepler and Cave. Starter Jake Odorizzi retired 12 straight and the Twins looked to be cruising until the sixth when the veteran righty suddenly lost control of his slider and walked the bases loaded.

Matt Magill didn't fare much better in relief, walking in a run on four straight pitches before inducing Victor Martinez into a run-scoring double play. Jim Adduci tied it with an RBI single.

Detroit Tigers pitcher Alex Wilson, left, gives up a solo home run to break the tie by Minnesota Twins' Eddie Rosario, right, in the eighth inning of a baseball game Sunday, Aug. 19, 2018, in Minneapolis. The Twins won 5-4. Wilson picked the loss. (AP PhotoJim Mone)

Detroit Tigers pitcher Alex Wilson, left, gives up a solo home run to break the tie by Minnesota Twins' Eddie Rosario, right, in the eighth inning of a baseball game Sunday, Aug. 19, 2018, in Minneapolis. The Twins won 5-4. Wilson picked the loss. (AP PhotoJim Mone)

Tigers reliever Buck Farmer allowed two runs on two hits in 2 1-3 innings in his first start this season. He got the nod after the Tigers realized Jacob Turner didn't meet a 10-day wait requirement after being designated for assignment earlier this month. On Saturday night, the Tigers said Turner would be called up from Triple-A to start.

TRAINER'S ROOM

Tigers: Iglesias returned to the lineup after a few days off to rest a bruised right thumb. Iglesias hurt the thumb on Tuesday against the Chicago White Sox and started Wednesday before being shut down, although he made one appearance off the bench.

Twins: Manager Paul Molitor said RHP Ervin Santana would see a hand specialist in the Twin Cities on Tuesday about the recurring finger discomfort that sidelined him for much of the season. Santana, who went on the 10-day DL on Sunday, started the season on the DL after having surgery on his right middle finger in February. Santana said Sunday he hasn't spoken recently to his surgeons, but added, "The last time I saw him in New York, he told me the pain will go away. Still here."

UP NEXT

Tigers: Off Monday before opening a two-game interleague series against the Chicago Cubs on Tuesday. Jordan Zimmermann (5-5) takes the mound for his 18th start of the season.

Twins: Top prospect Stephen Gonsalves will make his major league debut on Monday against the Chicago White Sox. The left-hander, a fourth-round draft pick by the Twins in 2013, went 9-3 for Triple-A Rochester this year with a 2.96 ERA.