NEW YORK – Jon Lester walked Derek Jeter leading off the first inning and allowed a single to Nick Swisher.

Even with a 2-0 lead, it seemed like the Boston Red Sox were headed for another frustrating day.

Lester worked out of trouble by retiring the next three hitters, pretty much breezed his way through seven innings and won consecutive starts for the first time since mid-May.

“It’s been a grinding season,” he said Saturday after pitching the Red Sox over the New York Yankees, 4-1. “I said back a month or so ago, I’m not giving up. Keep working hard and things will turn. The last handful of starts I feel like they have.”

Adrian Gonzalez hit a two-run homer in the first off David Phelps (3-4) and a Yankees nemesis, Pedro Ciriaco, was 4 for 4, raising his average against New York to .517 (15 for 29) — all in seven games this year.

That’s the second-highest for a player with at least 25 plate appearances against the Yankees in his career, behind only Barry Bonds’ .533.

“Do you think they’ll try to trade for him?” Red Sox Manager Bobby Valentine said. “It hasn’t surprised me. It amazes me that he is who he is with that kind of talent and hasn’t been utilized before.”

Boston reliever Craig Breslow and catcher Ryan Lavarnway became what is thought to be the first all-Yale battery in the major leagues since 1883. Breslow, a molecular biophysics and biochemistry major, is a 2002 graduate. Lavarnway, a philosophy major, left after his junior year in 2008 to turn pro.

“We didn’t need to put signs down. We’re all on the same wavelength,” Breslow joked.

Boston won for a fourth time in 11 games in a foundering year.

Lester (7-10) hadn’t won consecutive outings since May 14 against Seattle and May 19 at Philadelphia. He allowed five hits with four strikeouts and two walks, giving up his only run when Curtis Granderson homered in the fourth. Before defeating Cleveland 14-1 last Sunday, Lester had gone 0-5 with a 7.49 ERA in seven starts from the beginning of July.

“A lot more balls that are hit have been hit for hits and a lot of them, they were well-placed,” Valentine said. “Sometimes that happens and sometimes it just stops. Hopefully it’s stopped.”

Lester needed 24 pitches to get through the first. With two on, he struck out Robinson Cano, got Andruw Jones on a slow bouncer as the runners advanced and struck out Casey McGehee.

New York went 0 for 9 with runners in scoring position. After Granderson doubled leading off the seventh, Lester stranded him on third.

Lester didn’t look like a pitcher with a 5.03 ERA.

“You look at the numbers, you kind of step back because you know that’s not the type of pitcher that he is,” said Swisher, who went 3 for 4. “Today you got the best of Jon Lester you’ve seen in a while.”

After Andrew Bailey started the eighth and gave up a one-out single to Swisher, Breslow induced an inning-ending, double-play grounder from Cano, who is in a 1-for-21 skid. Alfredo Aceves pitched the ninth for his 25th save in 31 chances.

The only other all-Yale battery was on Sept. 15, 1883, when Jack Jones pitched to Al Hubbard for the Philadelphia Athletics.

NOTES: INF Mauro Gomez was recalled from Triple-A Pawtucket and LHP Felix Doubront was placed on the 15-day DL with a bruised right knee. The Doubront move was retroactive to Aug. 10, and the Red Sox expect he will rejoin the rotation as soon as he’s eligible to come off the DL. …

Brian Johnson, a Red Sox pitching prospect who was the final pick of the first round of the draft in June, was hit in the face with a line drive in a Future Games at Fenway Park.

Johnson sustained multiple orbital bone fractures on the left side of his face. A Red Sox spokeswoman said Johnson was taken to a hospital and was resting comfortably. There were no signs of a concussion.