Updated

DETROIT (AP) — Miguel Cabrera hit a go-ahead, three-run homer in the eighth inning, lifting the Detroit Tigers to a 4-3 win over the skidding Pittsburgh Pirates on Sunday.

The Pirates have lost a season-high eight straight and were swept by Detroit for the first time in eight matchups.

Armando Galarraga gave up two runs in his first home start since his near-perfect game.

Brad Thomas (4-0) replaced Galarraga and got the final out in the eighth inning for the win. Jose Valverde closed it for his 13th save, but gave up a run to end his scoreless streak at 25 appearances.

Garrett Jones hit a solo homer in the second inning and an RBI double in the fourth to put Pittsburgh ahead 2-0.

Alex Avila hit a solo shot to center in the seventh to pull the Tigers within a run. Cabrera put them ahead on a homer off Octavio Dotel the next inning, handing reliever Javier Lopez (1-1) the loss.

It was another home win for the Tigers, who are 20-10 at Comerica Park and 13-19 on the road.

Pittsburgh looked as though it might finally end its skid until Carlos Guillen, who hit a leadoff home run in the 10th inning to give Detroit a 4-3 win Saturday night, singled as a pinch-hitter to open the eighth inning and chase starter Jeff Karstens.

Guillen and Johnny Damon, who drew a two-out walk against Lopez, were on base when Cabrera sent an outside pitch to the opposite field and cleared the right-center fence.

Karstens was charged with two runs on six hits and a walk in seven-plus innings.

NOTES: Detroit rookie OF Austin Jackson left after a half-inning because of back spasms. ... Magglio Ordonez (strained oblique) was held out of the lineup again, but said he will play Tuesday when Detroit hosts the Washington Nationals. ... Pirates RHP Charlie Morton (shoulder) is scheduled to make a rehab start with Triple-A Indianapolis. ... The Tigers honored former 2B Jake Wood with their second annual African American Legacy Award before the game. Wood was the first African-American player to come through the Detroit farm system and play for the Tigers, making his debut in 1961.