HOUSTON -- Boston ace Josh Beckett and a trio of his teammates learned before the game that they were headed to the All-Star Game.
Beckett pitched a gem and the Red Sox scored the go-ahead run on a walk in the ninth inning for a 2-1 victory against the Astros on Sunday and the series sweep to accomplish that goal.
Beckett (7-3) allowed five hits, a run and no walks while striking out a season-high 11 in eight innings.
"He was great," Red Sox manager Terry Francona said of Beckett. "He had to be because we didn't have a whole lot going either."
|More on Red Sox at Astros|
Beckett said he tried not to think about his selection too much before the game.
"It's one of those deals where you don't want it to be a distraction," he said. "Obviously you're happy and everything like that, but you still have to go out there and do your job."
Ellsbury led the trio with two hits on Sunday during a game in which Boston's offense stalled after scoring 17 runs combined in the first two games against the Astros.
Francona wasn't surprised Houston walked Gonzalez.
"That's the nice thing about having a good lineup. We have good hitters," Francona said. "We always talk about, if they want to walk somebody, make them pay."
Youkilis said there's no extra motivation for him when the batter in front of him is intentionally walked.
"When the guy in front of you is hitting (.353) with 70-some-odd RBI, it's expected," he said. "I love the challenge ... I want to be the guy to bring the run home. We were very fortunate to do that."
Melancon was disappointed in his performance against Youkilis.
"I just missed," he said. "I got down in the count, and he was taking until I threw two strikes, and that just didn't happen. It's something that needs to be done, and I didn't do it."
Boston's other run came on a force attempt in the fourth inning where Houston's Brett Wallace committed an error, which allowed Youkilis to score the first run of the game. The Astros tied it with Angel Sanchez's RBI single in the fifth inning.
Jonathan Papelbon allowed one hit in a scoreless ninth for his 17th save.
The loss drops the last-place Astros to 1-8 on their homestand, which wrapped up Sunday.
The Red Sox got runners on base several times after Houston tied it, but couldn't capitalize until the ninth.
Josh Reddick walked with one out in the eighth before Boston brought on Ortiz as a pinch hitter. The Houston crowd chanted 'Papi, Papi, Papi,' before Ortiz grounded into a double play. Ortiz, normally Boston's designated hitter, went 0 for 11 on this nine-game road trip.
Ellsbury walked in the seventh before a single by Pedroia, but the Red Sox left the inning empty-handed after Houston turned a double play and reliever Sergio Escalona retired Youkilis.
Youkilis singled and J.D. Drew walked to start the fourth inning before Yamaico Navarro loaded the bases with his one-out single to right field. The Red Sox took a 1-0 lead on an error by Wallace when his throw home was too high and Youkilis scored. Varitek reached on a force attempt on that play. Youkilis took a cleat to what appeared to be the lower leg when catcher Carlos Corporan's foot landed on him as he slid into home. He grimaced in pain when it happened, but said after the game that he was OK.
Wallace doubled on a ball hit just in front of the wall in right center field with no outs in the fifth inning. Pinch hitter Angel Sanchez's ground-ball single, that sailed just beyond the reach of a diving Pedroia, scored Wallace to tie it at 1. Sanchez stole second base but Beckett struck out Michael Bourn to end the threat.
Beckett didn't yield another hit after Sanchez's RBI until pinch hitter Jeff Keppinger singled with no outs in the eighth inning, but he retired the next three to end the inning.
Varitek walked with one out in the third inning before Beckett bunted into a forceout. Ellsbury got Boston's first hit of the game after that and then stole second base. Lyles walked Pedroia but escaped the inning when Gonzalez hit a long fly ball to Bourn.
Beckett allowed a pair of singles with one out in the first inning before retiring the next 11. Houston's next hit came on Wallace's double to start Houston's fifth.
Houston rookie starter Jordan Lyles allowed three hits and a run with five strikeouts in five innings, but did not factor in the decision. Lyles, who at 20 is the youngest player in the majors, remains winless in seven starts.
- Houston's lone representative to the game is right fielder Hunter Pence. He was also selected in 2009, but didn't get on the field. "It would be very nice to get in the game," he said. "Last time I went in '09 and didn't get to play, it's kind of an empty feeling a little bit."
- Pedroia has reached base safely in 17 consecutive games.