BALTIMORE — So much went wrong for the Red Sox this season. Injuries limited the production of Mike Napoli and Dustin Pedroia, rookies in important positions did not perform to expectations, and offseason roster moves hurt the team far more than helped it.

But the contract extension in spring training that made David Ortiz content, that decision worked.

Big Papi had another big night on Friday, belting two home runs and driving in three runs as the Red Sox beat the Baltimore Orioles, 5-3, in 10 innings.

The American League East champion Orioles came back from a 3-1 deficit to tie the game in the seventh inning. Ortiz won it in the 10th with a two-run homer to right field off Darren O’Day.

Xander Bogaerts, who reached on the third error in the game by the Orioles, scored ahead of Ortiz, whose shot cleared the scoreboard in right field.

Ortiz has 34 homers and 102 RBIs and now has eight seasons with at least 30 homers and 100 RBIs, the most in Red Sox history. Ortiz had been tied with Hall of Famer Ted Williams.

“Another good season. Too bad that we’re in the situation that we are in,” Ortiz said. “It’s a compliment when your name is attached to a legend like Mr. Williams. It’s something that is based on a lot of consistency and hard work.”

Ortiz has 465 career home runs, tying Dave Winfield for 33d place all time. His 1,530 RBIs are 48th all time, one shy of Tris Speaker. Ortiz moved past Jeff Bagwell on Friday.

Ortiz has driven in 17 percent of the Red Sox’ runs this season. Batting in the middle of a lineup that averages the fewest runs in …read more