BOSTON — The Boston Red Sox had plenty of chances to add a little space at the top of the AL East.

The Red Sox failed to cash in on nearly every one, falling to Baltimore 6-3 Tuesday night as the Orioles pulled within two runs of Boston for the division lead.

After winning 12-2 Monday in the series opener, the Red Sox sputtered through Tuesday night. The Red Sox were 1 for 10 with runners in scoring position and left nine runners on base.

“Five runs in Fenway Park is nothing. We didn’t think that was going to be enough to win tonight,” said Travis Shaw, who was 3 for 4 and scored a run for Boston. “Unfortunately offensively, there was a couple times we had guys in scoring position and we just didn’t come up with the hits.”

Xander Bogaerts hit a solo homer for the Red Sox. The only other runs for Boston crossed when Baltimore rookie Dylan Bundy walked Ryan Hanigan and Dustin Pedroia with the bases loaded in the bottom of the second. Despite walking three and allowing two hits during the inning, Bundy limited the damage to just the pair of runs.

J.J. Hardy hit a three-run homer and Nolan Reimold added a two-run shot for Baltimore during a five-run second inning.

Jonathan Schoop added a leadoff homer in the ninth for Baltimore. With Toronto’s 6-2 loss to Tampa Bay, the Orioles pulled even with the Blue Jays for second in the division and tied for the two AL wild-card berths.

Bundy (9-5) survived a rocky second inning and pitched into the sixth, holding Boston to three runs on six hits over 5 1/3 innings.

Drew Pomeranz (10-12) gave up five runs and four hits in two-plus innings, his shortest outing of the season. He continued to struggle since a July trade from San Diego, falling to 2-5 with Boston.

“I just got in some tight spots and didn’t make pitches when I needed to. That’s about how it went,” Pomeranz said.

Pomeranz was pulled with nobody out in the third after Manny Machado’s leadoff single to left. After needing just 11 pitches to set down the Orioles in order in the first, Pomeranz labored through 45 pitches in the second.

Mark Trumbo led off the second with a single and Chris Davis walked, then with one out Hardy broke the scoreless tie with a towering homer that bounced off one of the signs above the Green Monster in left field. The Orioles weren’t done yet with Pomeranz, who walked Drew Stubbs after Hardy’s homer and Reimold followed with a line drive homer to left.

Bundy unraveled slightly in the bottom of the second, walking Hanigan and Pedroia with the bases loaded for Boston’s first two runs. Despite walking three and allowing two hits during the inning, Bundy limited the damage to just the pair of runs.

Boston didn’t score again until Bogaerts led off the fifth with his 19th homer of the season, pulling the Red Sox to 5-3.

The three-game series wraps up Wednesday. The Red Sox and Orioles meet again next week for four games in Baltimore.

Zach Britton pitched a scoreless ninth for his 42nd save.

CONTROL ISSUES

Pomeranz struggled with his control in his shortest outing of the season. He fell behind hitters and Baltimore’s batters took advantage. Hardy and Reimold both drove 3-2 pitches for their second-inning homers.

“It’s pretty frustrating,” Pomeranz said. “I was trying to get in on some of those guys and the ball was just shooting back over toward the middle of the plate.”

Pomeranz’s previous low for the season was three innings July 20 against San Francisco in his first start since joining Boston in a trade with San Diego.

BOSTON BULLPEN

Manager John Farrell credited Boston relievers for keeping the Red Sox in the game despite the offensive struggles. Boston used six pitchers after pulling Pomeranz and held Baltimore scoreless until Schoop led off the ninth with a homer off of Noe Rodriguez.

“They gave us an opportunity to get back in this one,” Farrell said.

TRAINER’S ROOM

Orioles: OF Steve Pearce was not in the starting lineup will have his right elbow examined for a nagging injury that he aggravated making a throw from left field Monday night.

Red Sox: Activated rookie OF Andrew Benintendi from the 15-day DL. Benintendi had been on the DL since Aug. 25 with a sprained left knee.

UP NEXT

Orioles: RHP Kevin Gausman (7-10, 3.61) starts for the Orioles in the series finale and Baltimore’s last game at Fenway Park this season.

Red Sox: RHP Rick Porcello (20-3, 3.21) already leads the majors in victories and is unbeaten in home starts.