BOSTON — The Chicago White Sox had a tough time scoring runs during their weekend in Boston. However, the pitching staff came through to deliver a series victory over the Red Sox.

Reynaldo Lopez pitched into the seventh inning, Daniel Palka had a two-run double and the White Sox won 5-2 Sunday to take two of three games against one of the majors’ best teams.

Chicago eked out a 1-0 win Friday against Red Sox ace Chris Sale before losing 4-2 on Saturday. White Sox pitchers held Boston to a .186 average (18 for 97) in the series.

“It says a lot about our pitching,” Palka said. “I don’t know stats-wise, but you look at the lineup – that’s the best lineup (in baseball). Our pitching did awesome.”

Jose Abreu, Tim Anderson and Trayce Thompson each drove in a run for Chicago, which has won six of its last 10. The White Sox finished their seven-game road trip at 4-3, capping their second winning trip of the season.

“If you get some pitching, you catch the ball as consistently as you possibly can, you get a little timely hitting, anything is possible,” Chicago Manager Rick Renteria said. “They’ve proven that over the last week or so.”

Lopez (2-4) gave up two runs and six hits while striking out six, with three walks and a hit batsman in 61/3 innings. He improved to 1-3 in eight road starts this season. Joakim Soria pitched a scoreless ninth for his eighth save.

Rafael Devers drove in a run for Boston, which has lost three of four. Red Sox starter Rick Porcello (8-3) gave up three runs and five hits over six innings, walking three and striking out five.

“We went 1 for 26 with men in scoring position the whole series,” Boston Manager Alex Cora said. “That’s the story of the whole series. We had our chances, we didn’t take advantage of it, and we lost the series.”

Abreu ripped an RBI double to left field on the 11th pitch of the game, scoring Yoan Moncada from first to put Chicago ahead 1-0. Devers tied it with his RBI single to center in the second after J.D. Martinez’s leadoff double.

Porcello hit Matt Davidson on the hand with a fastball to load the bases with one down in the third. Omar Narvaez popped out to shortstop, but Porcello walked Anderson to force in a run and put Chicago ahead 2-1.

Anderson scored from second on Thompson’s one-out groundout in the sixth after Porcello stumbled and fell while covering first base.

Moncada booted Eduardo Nunez’s two-out grounder to second in the seventh that would have allowed the White Sox to escape a bases-loaded jam, bringing the Red Sox within a run. Palka’s double to left with two out in the ninth sealed the win.

TRAINER’S ROOM

RED SOX: Outfielder Mookie Betts (10-day disabled list, left abdominal strain) continues to progress towards a rehab assignment. Cora said Betts hit in the cage during Sunday’s game and had “a great day.” … Second baseman Dustin Pedroia (10-day DL, left knee inflammation) still has discomfort but will travel on the team’s upcoming road trip. “It’s been a slow process,” Cora said.

WHITE SOX: Outfielder Adam Engel (right hamstring strain) missed his fourth straight game.

TOUGH BLOW

Porcello didn’t give up a hit in the third or sixth, but the White Sox scored a run in each inning thanks to his three walks and one hit batsman.

“It was a battle,” Porcello said. “I really felt like I pitched the ball a lot better than I did, mainly the walks.

HOMECOMING (OF SORTS)

Palka saw plenty of familiar faces in the stands this weekend. His brother, who lives in Nantucket, and mother attended the series at Fenway Park.

“I like coming here, here and Pawtucket (R.I.), because I get to see a lot of people I know,” he said.