BALTIMORE (AP) Whether they're winning the World Series or stuck in last place, the Boston Red Sox can almost always count on getting the best out of David Ortiz.
Ortiz hit two home runs, including a two-run drive in the 10th inning that lifted the Red Sox past the Baltimore Orioles 5-3 Friday night.
Although the AL East-champion Orioles are still in the running for home-field advantage throughout the postseason, manager Buck Showalter rested several regulars, including Adam Jones, J.J. Hardy and Nick Markakis.
The Red Sox, who reside at the opposite end of the AL East standings, long ago stopped playing meaningful games. But this one carried some significance for Ortiz, now in his 12th season with Boston.
He hit a solo shot in the fourth inning and connected in the 10th off Darren O'Day (5-2), his sixth multihomer game of the season and 47th of his career.
Ortiz now has 34 homers and 102 RBIs, the club-record eighth time he has had a 30/100 season - passing Ted Williams. At 38, Ortiz is the oldest major leaguer to go 30/100 since Frank Thomas did it at the same age in 2006.
''I don't know if you can say enough positives or accolades about David Ortiz, not just about what he did tonight but what he's done over an incredible career,'' Boston manager John Farrell said. ''Considering how many RBIs and how many home runs he has contributed this year, who knows where we'd be without him?''
Ortiz also moved into a second-place tie with Jim Rice for 100-RBI seasons with Boston, one behind Williams, who had nine.
''It's a big compliment to be mentioned with him. It's something I have done with a lot of consistency and hard work,'' Ortiz said. ''I have to come in and do my best every day regardless of how the team is playing.''
This is one of those years in which the Red Sox are faring poorly, despite Ortiz's impressive numbers.
''It's too bad that we have had the kind of season where we aren't in it,'' said Ortiz, who moved into a tie with Dave Winfield for 33rd on the career home run list with 465.
In the race for best record in the AL, Baltimore fell three games behind the Los Angeles Angels, who faced Texas later Friday night.
The most prominent starter in the lineup was Nelson Cruz, who had three hits, as did Alejandro De Aza.
Junichi Tazawa (4-3) worked the ninth and Edward Mujica got three outs to secure his seventh save and end Boston's five-game losing streak against Baltimore.
The star, though, was obvious: The man known as Big Papi.
''He comes up big twice for us tonight, and no bigger than that 10th inning,'' Farrell said.
After Ortiz connected off rookie Kevin Gausman, Yoenis Cespedes followed with his fifth home run since coming to Boston, his 22nd overall.
That made it 2-1, and the Red Sox added an unearned run in the fifth.
Gausman left after five innings with a bothersome blister on his pitching hand.
''We originally thought that my nail was coming up,'' he said, ''but then when we finally looked at it after the game, kind of found a blood blister under my nail.''
In the seventh, the Orioles used a two-out double by De Aza, a pinch-hit triple by Delmon Young, and a throwing error by shortstop Xander Bogaerts to tie it.
Young is 10 for 20 as a pinch hitter this season.
Red Sox: It will take some time before INF Brock Holt (concussion) is ready to return.
''There are still some important steps he has to complete,'' Farrell said.
Also, 1B Mike Napoli (finger, toe) ''will be mixed in there as we go through this final week,'' Farrell said.
Orioles: Markakis missed a second straight game with a sore shoulder. He was struck with a pitch on Tuesday.
''It was not a glancing blow,'' manager Buck Showalter said before the game. ''Nicky's pretty sore today, but he's available.''
Winless in his last six starts, Red Sox right-hander Rubby De La Rosa (4-7, 4.31 ERA) tries to break the cycle Saturday night against the Orioles, who will start Chris Tillman (12-5, 3.29), their likely choice to pitch Game 1 of the playoffs.