BALTIMORE -- Steve Pearce doubled in the tying and go-ahead runs in the eighth as host Baltimore evened the series with Boston. Pearce added an RBI double in the second and Brian Roberts belted a solo homer for the Orioles who beat the Red Sox 6-5.
The Red Sox (97-64) clinched home-field advantage all the way through the playoffs when Oakland lost to Seattle earlier in the day.
Kevin Gausman (3-5) pitched 1 1/3 scoreless innings of relief to earn the win and Jim Johnson worked a scoreless ninth for his 49th save. The Red Sox battled back from a 4-2 deficit to grab the lead in the seventh but Junichi Tazawa (5-4) allowed the first two batters of the eighth to reach.
Franklin Morales came on and struck out Nick Markakis before Pearce ripped a double into the corner in left to plate Nate McLouth and Danny Valencia. Daniel Nava went 4-for-4 and Dustin Pedroia added three hits and an RBI for Boston, which clinched home-field advantage throughout the playoffs with Oakland's loss earlier in the day.
Pedroia's RBI single in the fifth knotted it at 2-2 before Baltimore went back on top with two runs in the bottom of the frame. David Ross doubled in a run in the sixth and Jonny Gomes drove in the tying run in the seventh before Pedroia scored on an error to make it 5-4.
GAME NOTEBOOK: Jon Lester started for the Red Sox and allowed four runs on nine hits in five innings to snap a string of nine straight quality starts while Baltimore starter Wei-Yin Chen was charged with three runs on nine hits in 5 1/3 frames. ... Boston DH David Ortiz, CF Jacoby Ellsbury and C Jarrod Saltalamacchia all got the night off. ... Four of Pearce's last five hits have gone for extra bases.