BOSTON — The Baltimore Orioles continued their torrid June run with a 6-4 victory over the Boston Red Sox on Tuesday night.

The Orioles’ third win in a row was their 14th in their last 18 games — after they lost the first three games of the month.

While Baltimore, 8-3 against Boston this season, improved to 38-33, the last-place Red Sox, who went 2-1 in a weekend series at Kansas City in a brief sign of optimism, dropped to 31-41 overall — 10-22 against the rest of the AL East. The game marked the first of 10 straight against division foes.

David Lough, playing center field for Baltimore with Adam Jones injured, ripped a three-run homer off loser Joe Kelly (2-5) in the second inning while right fielder Chris Parmelee had a triple and double for the Birds.

Right-hander Ubaldo Jimenez, who came in with a 1-3 record and an 8.42 ERA lifetime against the Red Sox — including 0-1 with a 7.41 at Fenway Park — toiled through five innings (three runs, eight strikeouts) and earned his third straight win to raise his record to 6-3. He hasn’t lost since May 16.

Four relievers worked an inning apiece of one-hit ball, with left-hander Zach Britton earning his 20th save, his 16th straight since May 3. He allowed a walk and a two-out RBI double to second baseman Dustin Pedroia, and then DH David Ortiz, the tying run at the plate, lined out to end it.

The Orioles are 31-0 this season when leading after seven innings.

Red Sox manager John Farrell was ejected by home plate umpire Tim Timmons after the sixth inning over a couple of called third strikes against his players in the inning.

Third baseman Pablo Sandoval, who missed Sunday’s game with an ankle injury, continued his hot month with three straight singles and an RBI, while left fielder Hanley Ramirez had two hits and an RBI for Boston.

The Orioles scored four runs in the second inning. First baseman Chris Davis, left fielder Travis Snider and shortstop J.J. Hardy all singled to load the bases with nobody out. Second baseman Ryan Flaherty brought home a run with a sacrifice fly, and Lough ripped his fourth homer of the season into the Baltimore bullpen.

The Birds flew into two outs on the bases with Kelly on the ropes in the third. Parmelee, who had tripled in the first, doubled leading off the third and took third on a groundout. Davis walked and was off and running when shortstop Xander Bogaerts cut the throw from catcher Sandy Leon off and nailed Parmelee at the plate. Snider also walked but Leon picked him off first to end the inning.

Leon then led off the bottom of the third with a singled and rode to third on a double by the sizzling Mookie Betts, who extended his hitting streak to a career-high 10 games on the heels of being named American League player of the week. Right fielder Brock Holt brought Leon in with a groundout that sent Betts to third, but Pedroia struck out and Ortiz popped to center.

Kelly was gone in the fourth, leaving with two outs and two on. Robbie Ross Jr. came on, and his first pitch was drilled up the middle for an RBI single by DH Jimmy Paredes.

Boston got that run back in the bottom of the inning on a single by Ramirez, a wild pitch and Sandoval’s second hit.

With two outs in the home fifth, Jimenez walked Pedroia and Ortiz, the latter on four pitches, and Ramirez singled Pedroia home to make it 5-3. But Bogaerts struck out.

NOTES: Baltimore CF Adam Jones was out for the fifth time in seven games due to a right shoulder injury. He is unlikely to play in the series but hopes to avoid the disabled list. … The Red Sox made a series of roster moves, adding C Erik Kratz (picked up on waivers) and RHP Justin Masterson (back from the DL to join the bullpen), while OF Rusney Castillo and RHP Steven Wright were optioned to Triple-A Pawtucket. … RF Shane Victorino and C Ryan Hanigan were set to begin rehab stints at Pawtucket. … Baltimore RHP Bud Norris, who has one of his two 2015 wins over Boston, faces RHP Clay Buchholz on Wednesday. … RHP Miguel Gonzalez (groin) rejoined the Orioles and will be activated to start Thursday. … Notre Dame football coach Brian Kelly, whose team faces Boston College at Fenway Park in November, threw out the first pitch.