Mike Carp's pinch-hit grand slam in the 10th inning lifted Boston over Tampa Bay, 7-3, in the second test of a three- game series.
Joel Peralta (2-7) walked Dustin Pedroia, who was sacrificed to second by Shane Victorino, then issued a free pass to David Ortiz before exiting for Roberto Hernandez, who walked Mike Napoli and served up the big hit from Carp, a blast to dead center for a 7-3 Red Sox advantage.
"Come in and do what he did, you only see that in the movies," Red Sox designated hitter Ortiz said of Carp. "That guy is a good hitter. One day he's going to get plenty of at-bats. He reminds me of myself when I first started. Don't get to play too much, but with a good swing."
Koji Uehara (4-0) extended his streak to 34 consecutive batters retired in a perfect ninth, while Junichi Tazawa turned in a scoreless home 10th to lock down the victory.
Napoli contributed an early two-run double for the Red Sox, who have taken the first two in the set and seven of their last nine to extend their lead in the AL East to 9 1/2 games over Tampa.
James Loney homered, while David DeJesus and Evan Longoria drove in a run each for the Rays, who have lost eight of their last 11.
The Red Sox picked up three runs in the third. Pedroia singled with one out, Victorino followed with a double and Ortiz was given a free pass to load the bases. Two came home on a sinking liner from Napoli which Tampa's Wil Myers appeared to misplay in right, then Daniel Nava's groundout brought in Ortiz.
Tampa countered in the home half as Yunel Escobar led off with a double and scored on a DeJesus base hit, but Sox shortstop Stephen Drew saved more runs with his diving stop on a Desmond Jennings grounder to get the out at second with the bases loaded.
Dempster fanned Jennings swinging with the bases loaded to end the fifth, and the combined forces of Alex Cobb and Wesley Wright stranded two in the Boston sixth.
Tampa Bay climbed within a run in the seventh, as Ben Zobrist worked a two-out walk and scored when Longoria followed with a double.
Loney reached the seats in right with one down in the eighth to tie the game, 3-3, but the Rays were powerless to stop Uehara in the ninth.
"You can slice and dice it, but we had chances to score way more than three runs tonight and didn't do that," Rays manager Joe Maddon said.
Carp's pinch-hit slam was the first for Boston since Kevin Millar on June 7, 2003 against Milwaukee in an 11-10 win ... Uehara's streak is the longest since Bobby Jenks set down 41 in a row for the White Sox in 2007 ... The Red Sox announced Wednesday that the club will pay tribute to Hall of Fame outfielder Carl Yastrzemski by creating and unveiling a statue of the legendary left fielder at Fenway Park on Sept. 22 ... Zobrist tied Carlos Pena's club record for career walks with 460 during a seventh-inning base on balls ...Boston starter Ryan Dempster fanned seven and walked five over five full frames, allowing one run on four hits, while Cobb lasted 5 2/3 innings and served up seven hits and three runs.