BOSTON – David Ortiz returned to the lineup, Adrian Gonzalez left it and the Boston Red Sox broke a four-game losing streak Friday night.

Ortiz was back after missing 35 games with a right Achilles strain and had two hits and two RBI on the first two pitches he saw, sparking Boston to a 4-3 victory against the Kansas City Royal.

Gonzalez was pulled from the lineup minutes before the game amid reports he was part of a major trade being discussed with the Los Angeles Dodgers.

“We talked for a little bit,” Ortiz said. “He’s shocked like we are a little bit. Adrian wants to be here, that’s why he came here, and help this ballclub to win a World Series.”

Ortiz already has done that twice, in 2004 and 2007. But the Red Sox went 13-22 while he was sidelined as they dropped to 59-66 before beating the Royals.

“David was awesome,” said Andrew Bailey, who earned his first save after being sidelined until Aug. 14 following right thumb surgery. “You can’t say enough about that guy. And for him to come off the DL and to be such a sparkplug in our offense, he was huge tonight.”

Pedro Ciriaco’s two-run double in the seventh inning put Boston ahead 4-3, and Jon Lester continued his surge from a poor first half of the season with seven strong innings.

Lester (8-10) has won his past three starts and seemed fine after leaving with a cramp in his left hamstring with no outs in the top of the eighth. He had thrown three pitches in the inning, all balls.

“I should have said something after pitch one or my warmups,” he said.

Lester, who allowed three runs and six hits, felt improvement in his pitching even before his winning streak.

“I’m just winning. Winning cures everything,” he said. “I’ve been feeling good with the adjustments that we’ve made. I feel like I was headed in the right direction probably five or six starts ago.”

Ortiz started the Red Sox scoring with a two-run single in the first off Bruce Chen that drove in Ciriaco and Jacoby Ellsbury, who both singled. Then he doubled with two outs in the third but was stranded.

“He’s looking good,” Chen said. “I just try and make good pitches but obviously he’s one of the best hitters in the American League.”

Ciriaco continued his hot hitting since being called up July 6 from Triple-A Pawtucket. He went 4 for 6 in a 14-13 loss Thursday night to the Los Angeles Angels, his third four-hit game of the season, and went 2 for 4 on Friday night.

Trailing 3-2, Boston began the seventh with a walk to Mauro Gomez, who started in place of Gonzalez. Kevin Herrera (1-2) replaced Chen and gave up a single to Mike Aviles, sending Gomez to second. Scott Podsednik than sacrificed the runners to second and third before Ciriaco blooped his double into short left field.