Updated

Jim Thome hit an RBI double to spur a three- run 12th inning that propelled the Baltimore Orioles to a 9-6 victory over the Boston Red Sox in the middle test of a three-game series at Fenway Park.

Adam Jones doubled off Alfredo Aceves (2-10) to begin the 12th and scored the go-ahead run on Thome's one-out hit. A two-out single by Endy Chavez plated pinch-runner Xavier Avery and Chavez hustled home on a base hit by Manny Machado off Chris Carpenter.

Jim Johnson pitched the bottom of the 12th to notch his major league-leading 47th save, extending his club record. Tommy Hunter (6-8) retired the Red Sox in order in the 11th for the win, Baltimore's sixth in a row -- a season high.

Baltimore continues to trail the AL East-leading Yankees by one game. New York beat the Athletics, 10-9, in 14 innings to drop Oakland two games back of the Orioles for the top wild card spot.

Jones and Mark Reynolds each hit a leadoff home run for the Orioles, who have won 16 consecutive extra-innings games. Starter Randy Wolf gave up three runs on seven hits with two walks and two strikeouts in five innings.

"We knew we were going to have to score some runs today. We had some good performances," said Orioles manager Buck Showalter.

Aaron Cook allowed five runs on nine hits and two walks in 5 1/3 innings for Boston, which has dropped four straight.

"I was missing with all my pitches, leaving them kind of in the middle. I was just trying to grind to get through this," Cook said. "The guys did a great job battling back, but in the end it just didn't work out for us."

Cook was removed after allowing back-to-back hits to Chris Davis and Machado. Boston manager Bobby Valentine went to Rich Hill for a lefty-versus-lefty matchup, but Ryan Flaherty delivered by driving Hill's first pitch to the gap in right center. Flaherty's first career triple broke a 3-3 tie.

Jones took Clayton Mortensen deep in the seventh, but the Red Sox trimmed their deficit to 6-5 after loading the bases with no outs in the bottom of the inning. Cody Ross and Ryan Lavarnway each drove in a run with a fielder's choice grounder.

Boston tied the game in the eighth when Pedro Strop yielded consecutive two- out doubles off the Green Monster to Daniel Nava and Scott Podsednik.

The Orioles manufactured a first-inning run without a hit. Nate McLouth walked to begin the game and promptly stole second base before consecutive groundouts by J.J. Hardy and Jones brought him home.

Boston tied the game with a pair of opposite-field hits in the bottom of the first. Dustin Pedroia stroked a ground-rule double and came around to score on Lavarnway's two-out single to right.

But the Orioles reclaimed the lead on Machado's base hit up the middle in the second. Machado knocked in Davis, who had singled and advanced on a botched pickoff attempt.

The Red Sox failed to capitalize on a defensive miscue in the third. The third baseman Machado let a ground ball off the bat of Ross go through his legs after Pedroia worked a one-out walk. Wolf retired the next two batters to preserve the lead, which grew to 3-1 on Reynolds' blast in the fourth.

Boston pulled even in the home half when Mike Aviles led off with a single and Danny Valencia followed with a home run over the Monster. The Red Sox had two men aboard with one out later in the frame, but Pedroia grounded into a double play.

Game Notes

The 16-game win streak in extra innings is the longest in the majors since the 1949 Indians won 17 in a row ... Baltimore had not committed an error in its last 10 games ... The Orioles recorded their 45th road win of the year, tying Washington for the most in the majors.