BALTIMORE -- Roaring from behind and then finally winning in extra innings, the Boston Red Sox did more than merely maintain their lead in the AL East.
They showed their mettle, a characteristic that should come in handy during the postseason.
Andrew Benintendi hit a two-run single in the 11th inning, Mookie Betts had four RBIs and Boston beat the Baltimore Orioles 10-8 Monday night for their ninth win in 12 games.
RELATED: MONDAY'S MLB POSTSEASON BRACKET
Xander Bogaerts homered and scored three runs for the Red Sox, who remained three games ahead of the second-place Yankees in the AL East and reduced to four their magic number for clinching a playoff berth.
Boston erased a five-run deficit with a six-run fifth inning and needed 10 pitchers to beat a skidding Orioles team that has now lost 10 of 12.
"This is a big one, being down early and coming back," Benintendi said. "Obviously it's a good win, but it's kind of a character win. Everybody contributed tonight."
After three walks -- one intentional -- off Miguel Castro (3-2) loaded the bases in the 11th, Benintendi hit a grounder past diving second baseman Jonathan Schoop to give Boston its major-league leading 14th extra-inning win against three defeats.
"That's one of the reasons we stand here today," manager John Farrell said.
Matt Barnes (7-3) pitched the 10th and Carson Smith got three outs for his first save.
"Our group has such grit, such determination, such competiveness," Farrell said. "There's no quit in them.
Red Sox second baseman Dustin Pedroia left in the fourth inning after being struck in the face by a foul ball he chopped off the plate. The team described the injury as a bruised nose and listed his availability as day to day.
It was the second freak injury Pedroia sustained at Camden Yards this season. On April 21, the All-Star was spiked on a late slide by Manny Machado, a play that created bad blood between the teams into May.
Baltimore built a 5-0 lead against Doug Fister over the first three innings, taking advantage of five walks and getting a two-run double from rookie Austin Hays.
After Betts hit an RBI double in the fourth, Adam Jones countered with a run-scoring single in the bottom half. But the 6-1 advantage vanished in the fifth under a torrent of six hits against Dylan Bundy and two Baltimore relievers.
The key blows in the six-run inning were a two-run double by Brock Holt -- Pedroia's replacement -- and a bases-loaded double by Betts that scored all three runners.
"It was just that one inning. I let things slip away from me," Bundy said. "I didn't really limit the damage very well, obviously. I was just leaving balls over the middle of the plate and they made me pay for them."
Pedro Alvarez homered in the bottom half and Tim Beckham put Baltimore back in front with a two-out RBI double .
"We find a way to build a big inning, we give it right back and then from that point on the bullpen is outstanding," Farrell said.
The see-saw leveled in the seventh when Bogaerts homered off Donnie Hart to make it 8-all.