Conor Jackson hit a grand slam and Jacoby the-park homer as part of a seven-run seventh-inning, 9, to salvage a split of a doubleheader.

In the opener, Robert Andino hit a two-run homer and Nolan Reimold and J.J. Hardy each had solo shots in the Orioles' 6-5 victory.

Boston received a boost in the nightcap, however, as Jed Lowrie returned to the lineup to go 2-for-5 with a three-run homer and four RBI.

Dustin Pedroia also knocked in four runs for the Red Sox, who lead the idle Rays by two games in the AL wild card race. They sit five games behind the AL East-leading Yankees, who defeated the Twins on Monday.

Red Sox starter John Lackey allowed eight runs on 11 hits over 4 1/3 innings. He was reliever by Scott Atchison (1-0) who tossed 1 1/3 scoreless innings to earn the win.

"I'm glad we won, obviously, but I'm pretty frustrated," said Lackey, who hasn't recorded a win since August 23.

Brian Matusz (1-8) lasted just 1 2/3 frames, surrendering six runs and as many hits to suffer the loss.

"It's frustrating to be able to go out there and not hold the opponent," Matusz said. "I'm just going to keep building, keep working, that's all I can do."

Reimold had three RBI for the Orioles.

With the Red Sox up 11-9, Ellsbury began the home seventh with a fly ball which caromed off the triangle at the deepest part of the park in right-center and rolled along the base of the wall. He crossed the plate standing up.

"When I hit I was hoping it was going to get out, and once I saw it hit the wall I saw it carom and I thought I had a pretty good shot at getting an inside-the-park home run," Ellsbury said. "And when I saw Bogey (third base coach Tim Bogar) waving me, I knew it was going to happen."

Singles by Marco Scutaro, Adrian Gonzalez and Pedroia pushed another run across. After an Ortiz walk, Brad Bergesen entered and allowed a Lowrie RBI single.

Jackson then ripped a a 2-1 fastball over the Green Monster for an 18-9 Red Sox lead.

Earlier, the gathering storm that has marked Boston's September swoon appeared even cloudier after a three-run Orioles first.

The inning began as Matt Angle singled then stole second priro to a walk to Hardy, and Nick Markakis' single through the right side plated a run. Vladimir Guerrero added a sacrifice fly before Chris Davis' base hit. Right fielder Darnell McDonald's throw home was on time, but the sliding Markakis dislodged the ball from Jason Varitek's glove for a 3-0 lead.

A glimmer of sunshine appeared, however, in the form of Lowrie, who returned to the field after missing close to a week with a sore left shoulder.

In the bottom half, Ellsbury scored on a Pedroia groundout and Lowrie followed Ortiz's double with a three-run, go-ahead homer to whip the Fenway faithful into a frenzy.

The momentum carried over to the second. Scutaro doubled home Varitek and Matusz was relieved by Chris Jakubauskas after an intentional walk to Gonzalez. Pedroia followed with an RBI single to give the Red Sox a 6-3 lead.

With two down in the top of the third, Lackey struck out Guerrero, but the ball got past Varitek, and the designated hitter reached first to extend the inning. A Davis single and an Andino walk loaded the bases before Reimold's two-run single made it a 6-5 game.

But the Red Sox rallied with a five-run bottom half, exhibiting a measure of moxie that has been lacking in recent weeks.

McDonald and Scutaro both knocked in a run sandwiched around Ellsbury's RBI double before Jakubauskas gave way to Jason Berken. Consecutive RBI singles by Pedroia and Ortiz made it an 11-5 game.

Markakis had an RBI triple in the top of the fourth, Reimold and Ryan Adams both knocked in a run in the fifth with a sac fly and a single, respectively, and Guerrero's RBI double in the sixth cut the Orioles' deficit to 11-9.

"It was a well-needed win," said Varitek.

Game Notes

Jackson notched his second career grand slam...Lowrie hadn't played since September 13 thanks to a lingering shoulder injury...The Red Sox tallied 20 hits.