Updated

Chris Davis hit his league-leading 20th homer of the season and the Baltimore Orioles used a three-run seventh inning to beat the Detroit Tigers, 4-2, in the rubber match of a three-game series.

Alexi Casilla, Danny Valencia and Nate McLouth added an RBI apiece for the Orioles, who went 4-1 on a five-game homestand.

"It was big for us," Davis said of the homestand. "For us to battle back after the loss (Saturday) and get the win, it's good."

Baltimore starter Kevin Gausman allowed one run on five hits over six innings in his third career start. Brian Matusz (2-0) gave up one run on three hits in the seventh to pick up the win.

Prince Fielder hit a solo home run for the Tigers, who went 1-4 on a five- game road trip. Jhonny Peralta had an RBI.

"We had a rough stretch, rough road trip," Detroit outfielder Torii Hunter said. "It's baseball. We're going to bounce back."

Detroit starter Rick Porcello (2-3) allowed three runs on six hits while striking out seven over six-plus frames to take the loss.

Fielder's homer in the fourth made it 1-0 Detroit. The Tigers, however, left a man on third during their next at-bat.

Detroit managed to tack on another run in the seventh. Fielder doubled to center and Victor Martinez singled to left to put men on the corners with one out. Peralta followed with a bloop single to right to plate Fielder.

The Orioles responded with three runs in the bottom half of the frame. Davis led off with a homer to right. Chris Dickerson and J.J. Hardy followed with back-to-back singles, chasing Porcello from the game. Phil Coke came in from the bullpen and was greeted by pinch-hitter Valencia's RBI single to shallow right. After Chris Snyder bunted into a fielder's choice, McLouth hit an RBI single to center to make it 3-2 Baltimore.

The home team added an insurance run in the eighth. Davis doubled and raced home on Casilla's two-out double to left.

Jim Johnson tossed a scoreless ninth to pick up his 18th save of the season.

Game Notes

Each team had 10 hits ... Porcello fell to 1-4 lifetime against the Orioles ... The Tigers acquired the contract of outfielder/third baseman Francisco Martinez from the Seattle Mariners in exchange for a player to be named later or cash considerations by June 15. Detroit optioned Martinez to Single-A Lakeland. To make room for Martinez on the club's 40-man roster, the Tigers designated for assignment the contract of outfielder Quintin Berry.