BOSTON – Jon Lester’s strong performance saved the Boston Red Sox from another embarrassing weekend.

After losing 10-3 and 14-3 to the New York Yankees, the Red Sox salvaged the finale of their three-game series with a 9-3 win Sunday night behind Lester’s fourth straight solid outing.

“Regardless of what the team does the day before or the week before, I’m determined to go out and pitch well,” said Lester, who allowed two runs in seven innings.

“The past two days haven’t been too much fun, but it was nice to go out there and at least get one from these guys.”

One week earlier, the Red Sox completed an even worse weekend against a much weaker team. A 3-2 loss on the road gave the Baltimore Orioles a three-game sweep. Two nights later, Lester allowed one run and five hits in eight innings in a 5-1 win over the Angels in Boston.

He is 3-0 with 30 strikeouts and a 0.98 ERA in his last four starts, lowering his ERA from 8.44 to 3.71. Last season, he had a 6.51 ERA through eight starts and finished at 3.41.

“There’s that hump that he seems to have to get over every year,” Manager Terry Francona said, “but once he gets over it, he’s OK.”

A.J. Burnett (4-1) continued to have problems at Fenway Park. He worked 41/3 innings and gave up nine runs, matching his career high, also set in Boston last Aug. 22. He’s the first opposing pitcher since 1952 to give up eight runs or more in three different games at Fenway.

“I don’t want to take anything away from these guys, but I think I would have had a bad start no matter who I faced,” Burnett said. “I just put the ball over the plate. I felt like I had a good hook tonight, but I didn’t have a good heater.”

Jeremy Hermida homered as the Red Sox finally put their hitting and pitching together and broke the Yankees’ six-game winning streak.

Lester entered having allowed just one earned run over his previous 202/3 innings and gave up four hits against New York while striking out seven.

Alex Rodriguez tied Hall of Famer Frank Robinson for seventh place with 586 career home runs when he hit a solo shot off Lester in the fourth.

The Red Sox took a 1-0 lead in the second when J.D. Drew singled, moved up on a wild pitch and scored when Hermida’s liner to left glanced off the glove of Marcus Thames for an error.

They added five runs in the third when they batted around. Boston loaded the bases on a leadoff walk to Marco Scutaro, a double by Dustin Pedroia and a one-out walk to Kevin Youkilis. Drew followed with a sacrifice fly, David Ortiz doubled in a run, Adrian Beltre hit a two-run double and Hermida had an RBI single.

The Yankees cut the lead to 6-2 in the fourth on solo homers by Nick Swisher, his seventh of the season, and Rodriguez, his third of the season and first in 62 at-bats.

“He’s got three homers,” Manager Joe Girardi said. “It’s not like he doesn’t have any. He might hit five in a hurry and then it’ll be a moot point.”

Boston made it 7-2 in the fourth on an RBI double by Youkilis, and 9-2 in the fifth on a two-run homer by Hermida. The homer knocked out Burnett, who had a 15.63 ERA in three games at Fenway Park last year but is 4.04 there overall.