BOSTON (AP) -- Anthony Rizzo hit a routine grounder for an out, and it gave struggling San Diego a lead it never relinquished.
One night after Adrian Gonzalez , the star Rizzo was traded for, drove in the go-ahead run for the Boston Red Sox, the rookie playing Gonzalez's old spot at first base for the Padres did the same in a 5-4 victory Tuesday.
His bases-loaded groundout in the seventh inning went to Gonzalez, but Rizzo wasn't concerned with his connection to the major league-leader in batting average and RBIs.
"The biggest thing is that we won," he said after San Diego snapped a season-long six-game losing streak. "When you put the ball in play a lot happens. So I put it in play. They wanted a ground ball. They got it. I wanted to get the run in. I got it."
Gonzalez bobbled the ball before getting the out, but it was hit slowly enough and wide of the base that Chase Headley almost certainly would have scored without the misplay.
Rizzo tripled in his major league debut on June 9, then homered two days later before slumping.
"He's kept his confidence," Headley said. "I haven't seen him sulk or pout or anything like that. For a 21-year-old that's a pretty mature way for him to handle things."
Boston, losing for just the third time in 17 games, had tied it in the sixth on a run-scoring single by Gonzalez that gave him 68 RBIs.
Chad Qualls (4-3) pitched 1 1-3 scoreless innings to get the win. Mike Adams pitched a perfect eighth before Heath Bell worked the ninth for his 19th save in 20 opportunities.
"When you come in Fenway Park against this lineup and hold them down the last three innings, it's great work out of the 'pen," Padres manager Bud Black said.
Boston's AL East lead dropped to one game over the New York Yankees , who were rained out at Cincinnati.
Headley started the seventh with a single off Dan Wheeler (0-1). Ryan Ludwick flied out, but Headley advanced to third on Jesus Guzman 's ground-rule double and Orlando Hudson was walked intentionally.
"That's a situation where the game is on the line," Black said. "They walk Hudson and a lot of times a player can get too amped up ... but (Rizzo) had a good at-bat. He hit a hard ground ball in the right spot."
Daniel Bard allowed Rizzo's run-scoring grounder before Cameron Maybin bounced out to end the inning.
Rizzo said he felt comfortable in the crucial situation.
"It's baseball," he said. "This is the best of the best and this is where everyone wants to be. It's a challenge. It's a grind every day. You've got to be on top of your game every day."
The Red Sox, who had scored at least 10 runs in five of their previous nine games, went ahead 1-0 on Kevin Youkilis ' RBI double in the first. Youkilis finished with four hits.
Alfred Aceves, who got the start for Boston in place of major league ERA leader Josh Beckett , lost his control after retiring the first two batters in the second. He allowed two runs when he walked five consecutive batters - Maybin, Nick Hundley , Chris Denorfia , Jason Bartlett and Headley. Then Ludwick flied out.
"I lost command," he said. "I lost command and was trying to keep the ball down."
Aceves set down the first two batters in the third before getting into trouble again. Rizzo doubled off the Green Monster in left field - "That was cool," he said - and scored on Maybin's single, and Hundley's run-scoring double put the Padres ahead 4-1.
Beckett has a stomach ailment and manager Terry Francona hopes he will be able to pitch Saturday at Pittsburgh.
The Red Sox got a run back in the third when Josh Reddick tripled and came home on Jacoby Ellsbury 's single.
Reddick, playing left field with Carl Crawford on the disabled list, added an RBI double in the fourth.
NOTES: The paid attendance of 38,422 was the largest at Fenway Park since the end of World War II. The previous top paid attendance was 38,347 on May 21, 2009, for a 5-1 win over the Toronto Blue Jays. ... The Padres made six player moves. They put 1B Brad Hawpe on the 15-day disabled list, optioned LHP Wade LeBlanc to Triple-A Tucson, promoted LHP Josh Spence from Double-A San Antonio, recalled Catcher Kyle Phillips from Tucson, designated OF Luis Durango for assignment and requested unconditional release waivers on INF Jorge Cantu . ... Boston DH David Ortiz 's hitting streak at Fenway Park ended at 14 games. ... Of San Diego's 75 games, 46 have been decided by two runs or less. ... Padres starter Mat Latos threw a career-high 120 pitches.