CC Sabathia kept letting the Boston Red Sox get on base.

Sooner or later, one of them was bound to score.

Josh Beckett outpitched Sabathia to lead the Red Sox to a 4-0 victory over New York on Sunday night, and Boston took two out of three games from the Yankees after opening the season with six straight losses.

Sabathia gave up just one run in 5 2-3 innings despite allowing 14 baserunners — nine hits, four walks and a hit batter. But that was enough for Beckett, who struck out 10 while pitching eight innings of two-hit ball.

"It's always like that," Sabathia said of facing the Red Sox. "They've got a good lineup. You try to keep battling and get outs."

Sabathia (0-1) has yet to win this season despite allowing just four total runs in three starts. In his last outing Tuesday, he pitched seven shutout innings, allowing just two hits, and left with a 4-0 lead in a game the Yankees lost 5-4 in 10 innings.

"He could pretty easily be 3-0," manager Joe Girardi said.

The Yankees were playing without third baseman Alex Rodriguez, who was scratched just before the game with flulike symptoms. Girardi said he expected to have Rodriguez back in the lineup against Baltimore on Tuesday.

"He looked wiped out," Girardi said. "Hopefully, the rest today and the rest tomorrow and he'll be back at full strength."

The Red Sox returned home on Friday for three games against their AL East rivals after their worst start since they lost their first eight games in 1945. They ended that by beating the Yankees 9-6 on Friday before losing 9-4 on Saturday.

Boston's starters struggled in seven of their first eight games, but Beckett (1-1) walked only one batter and retired the last 14 he faced. Jonathan Papelbon worked a perfect ninth inning in a non-save situation.

"We needed a good, quality start," Red Sox catcher Jason Varitek said, "especially when you have that other guy on the mound over there. And we got a huge quality start out of Josh."

Dustin Pedroia reached base all five times he went to bat with three singles — all against Sabathia — an intentional walk and a force play. He got on base in 10 of his last 11 trips to the plate as the Red Sox won despite stranding 16 runners, including three in both the sixth and seventh innings.

Beckett set down the first seven hitters, four on strikeouts, before Eric Chavez singled to center and Russell Martin was hit by a pitch. But Brett Gardner grounded into a double play.

Beckett struck out Derek Jeter to start the fourth then walked Mark Teixeira, who took second on a single by Robinson Cano, the last Yankee to reach base in the game. The right-hander got out of the inning by striking out Curtis Granderson and retiring Nick Swisher on a grounder.

The Red Sox took a 1-0 lead in the third on Mike Cameron's RBI single but kept wasting opportunities as they stranded 12 runners through six innings.

They finally scored again in the seventh on Marco Scutaro's two-run single. David Ortiz began the inning with a walk before Cameron struck out, but J.D. Drew walked and Jason Varitek singled, loading the bases for Scutaro.

Boston made it 4-0 in the eighth on a leadoff walk to Kevin Youkilis and a long double off the center field wall by Ortiz.

A baserunning gaffe by Youkilis cost the Red Sox a run in the second. Boston loaded the bases on singles by Pedroia and Gonzalez and a walk to Youkilis. Ortiz grounded to second baseman Cano, who threw for an apparent force out at second to Jeter, whose relay to first got Ortiz.

Pedroia went home and Gonzalez took third on the play. But Youkilis was called out for leaving the baseline, sending Pedroia back to third and Gonzalez to second while allowing the out on Ortiz at first. Cameron then singled home Pedroia before Drew struck out.

Notes: Red Sox RHP Clay Buchholz and the team agreed to a four-year deal through 2015 that includes club options for 2016 and 2017. He was second in the AL with a 2.33 ERA and made the All-Star team last year but is 0-2 with a 7.20 ERA this season. ... Only two of the Yankees' outs made it out of the infield, fly balls to right fielder Drew by Cano in the second and Martin in the eighth.