NEW YORK — Jacoby Ellsbury hit an RBI single off old roommate Clay Buchholz in his first game against the Red Sox, Michael Pineda won while pitching with some noticeable substance on his hand, and the New York Yankees beat Boston 4-1 Thursday night.

Brian McCann ended an 0-for-14 slide with a run-scoring single that put the Yankees ahead during a two-run fourth in the first of 19 games between the rivals this season.

Making just his third big league start, Dean Anna homered as New York made it 4-0 in the fifth.

After spending nine years in the Red Sox organization and winning World Series titles in 2007 and last year, Ellsbury left for a $153 million, seven-year contract with the Yankees. And his first game put him at the plate against Buchholz, his roommate at Lowell of the New York-Penn League in their first summer of professional ball.

Ellsbury grounded out in the first inning, reached on an error and scored the game’s first run in the fourth, singled sharply to left to drive in a run in the fifth, and grounded out in the eighth.

Pineda (1-1), making his first Yankee Stadium start 27 months after he was acquired from Seattle, took a two-hit shutout into the seventh and appeared completely recovered from the shoulder surgery that sidelined him for two years. Throwing at up to 95 mph, he allowed four hits in his first Yankees’ win, struck out seven and walked two.

Pineda pitched for the first four innings with a dark substance on the lower palm of his pitching hand, but it was gone by the fifth.

Daniel Nava led off the seventh with a home run into the second deck in right, and Xander Bogaerts’ single chased Pineda.

With David Robertson on the disabled list and Shawn Kelley and Adam Warren unavailable after pitching Wednesday, the Yankees scrambled their bullpen. Cesar Cabral and David Phelps retired Boston’s last nine batters — striking out five — and Phelps got seven outs for his first career save.

Buchholz (0-1) was sharper than in his opening start against Milwaukee, giving up four runs — two earned — and seven hits in six innings with six strikeouts and no walks.

Boston went 13-6 against New York last year, its most wins against the Yankees since 1973. While the Red Sox won their third title in 10 years, New York failed to make the playoffs for just the second time in 19 seasons.

Ellsbury reached leading off the fifth when Jonathan Herrera appeared to look up while fielding his grounder to third and allowed the ball to pop out of his glove for an error. With Herrera moved between second and first on a shift, Carlos Beltran singled between the third baseman and second baseman Dustin Pedroia, into right field.

McCann lined a single past Mike Napoli about 2 feet fair down the first-base line, driving in Ellsbury, and Alfonso Soriano hit a double-play grounder to shortstop that brought in a second run.

Anna opened spring training wearing No. 93 after six minor league seasons with San Diego, which traded him to New York in November, started at second base as Brian Roberts got his first day off. Now wearing a more respectable No. 45, Anna homered to right on an 87 mph splitter, his first in the big leagues after hitting 40 in the minors.

A’s 6, Twins 1

MINNEAPOLIS — Dan Straily pitched three-hit ball for seven innings and Sam Fuld hit a rare home run to help the Oakland Athletics complete a three-game sweep of the Minnesota Twins with a 6-1 victory Thursday.

Straily (1-1) gave up one run and struck out five. The Athletics have gone nine straight games to start the season without their starter allowing more than three runs.

Fuld hit just his sixth homer in 738 career plate appearances and singled. Josh Donaldson also hit a two-run homer.

Mike Pelfrey (0-2) gave up six runs on nine hits and four walks in five innings. The Twins have had only one quality start in their first nine games.

Brian Dozier hit his third home run of the season for Minnesota.

Straily, a 25-year-old righty selected in the 24th round of the 2009 draft, is just another in the seemingly endless line of young, strong starting pitchers churned out by Billy Beane’s Moneyball machine.

Last year he led all AL rookies in starts, innings and strikeouts, and he brushed off the early homer to Dozier to slow down the Twins for the rest of the game. He allowed two baserunners — both on walks — over his final five innings

Pelfrey had no such luck, laboring through another poor outing for Minnesota’s starting rotation. Donaldson’s homer in the third inning put him behind 3-1 and he walked No. 9 hitter Nick Punto in the fourth before Fuld yanked a pitch just over the wall in right field for a 5-1 lead.

The cushion allowed the A’s to avoid a save situation on the same day manager Bob Melvin demoted struggling closer Jim Johnson, who is 0-2 with an 18.90 ERA in five appearances this season. The A’s will go with a closer-by-committee approach while they try to get Johnson straightened out, Melvin said.

NOTES: The announced attendance of 20,650 was the smallest in Target Field history. ... Umpires reviewed a play in the sixth inning in which Jed Lowrie was thrown out at home by Twins CF Aaron Hicks. Umpires were looking to see if C Josmil Pinto was illegally blocking the plate. The call of an out was confirmed. ... Twins assistant GM Rob Antony said star prospect Byron Buxton likely will not start playing until May because of a wrist injury. ... The Twins open a series against Kansas City on Friday night. RHP Kyle Gibson (1-0, 1.80) will start the opener against Royals LHP Bruce Chen (0-0, 1.42). ... The Athletics head to Seattle for a series against the Mariners. LHP Tommy Milone will make his first start of the season on Friday night against Mariners RHP Felix Hernandez (2-0, 1.88).