BOSTON -- Anthony Ranaudo pitched six solid innings in his major league debut and Dustin Pedroia drove in two runs as the Boston Red Sox snapped a three-game losing streak with a 4-3 victory over the New York Yankees on Friday night.

Ranaudo (1-0) allowed two runs and four hits, including a solo homer Carlos Beltran hit into the New York bullpen in the fourth. Ranaudo walked four and struck out two, and he scattered the few mistakes he made well enough for Boston to hang on after taking a 2-0 lead in the third.

Derek Jeter led off the eighth with a shot over the Green Monster to pull the Yankees within 4-3, but they failed to drive Mark Teixeira for the tying run after his ground-rule double with one out.

Koji Uehara pitched the ninth for his 22nd save.

The Red Sox, mired deep in last place in the AL East after losing eight of nine, have won three straight over the Yankees.

Boston got to Chris Capuano (1-2) in the third when Brock Holt hit a one-out triple down the right-field line, then scored when Pedroia followed with a drive over Jacoby Ellsbury's head in center. The ball bounced into the stands for a ground-rule double and Pedroia scored easily from second on a single by David Ortiz.

After Beltran's 13th homer of the season cut the lead to 2-1, the Red Sox got an RBI single from David Ross in the fourth and added an insurance run in the seventh when Pedroia singled home Mookie Betts, who led off with a single and advanced on a sacrifice.

Capuano pitched 6 1-3 innings for New York, allowing four runs and eight hits. He struck out five and didn't walk a batter.

Yankees: Michael Pineda will start in Triple-A Scranton on Sunday with a limit of about four innings or 65 pitches. Doctors will evaluate Masahiro Tanaka on Monday, three weeks after he was given a platelet-rich plasma injection in his torn ulnar collateral ligament as an alternative to surgery.

Red Sox: Will Middlebrooks returned for Boston after missing 67 games with a broken finger and started at third base. Ross came up limping when he grounded out to end the sixth. He left the game and was replaced by Christian Vazquez.

Yankees: Shane Greene (2-1) makes his fifth start in the same ballpark where he made his major league debut on April 24. Greene got plenty of run support as the Yankees routed the Red Sox 14-5. It will be the 49th game a rookie has started for the Yankees this season.

Red Sox: Allen Webster (1-0) makes his second start of the season as the Red Sox try to re-establish the rotation after trading starters Jon Lester, John Lackey, Jake Peavy and Felix Doubront. Webster went 5 1-3 innings last week against the Rays, allowing two runs and five hits and getting the victory as Boston snapped a five-game losing streak.