The Phillies, who remained two games behind first-place Atlanta in the NL East, split a two-game interleague series with the major league-leading Red Sox for the second time in three weeks.

Ramos, the two-time All-Star catcher acquired from Tampa Bay on July 31, made a big impact after missing a month because of a strained hamstring. He hit his second career triple and first in seven years leading off the bottom of the sixth inning, chugging around the bases after his liner off Joe Kelly (4-1) to right-center took an odd bounce off the wall.

Ramos scored on pinch-hitter Scott Kingery’s sacrifice fly to give the Phillies a 4-3 lead. He hammered a two-run double with two outs in the seventh off Drew Pomeranz to extend the lead to 6-3 and scored on Maikel Franco’s single.

“It is a special day for me,” Ramos said. “I’ll remember it like my MLB debut. I wanted to show everybody what I can do.”

Ramos provided a huge spark for a struggling offense, and also threw out Brock Holt trying to steal second from his knees. He finished the night getting a cooler shower on the field.

Seven relievers combined to allow one unearned run in 6 2/3 innings for Philadelphia. Tommy Hunter (4-2) earned the win by getting one out in the sixth. Seranthony Dominguez got four outs for his 13th save in 16 chances.

“It was a collective group effort from the bullpen,” Hunter said.

Down 3-0, the Phillies rallied in the fourth against Nathan Eovaldi. Ramos hit an RBI double off the top of the fence in right and Nick Williams scored on Odubel Herrera’s RBI groundout. With two outs, pinch-hitter Carlos Santana ripped an RBI single past second baseman Holt positioned in shallow right to tie it at 3.

Eovaldi allowed three runs — one earned — and seven hits in five innings during his fourth start for the Red Sox.

“We’ll take 7-2 on any road trip during the season,” Red Sox manager Alex Cora said. “We went through a tough stretch and to do what we did, I’m proud of them.”

Phillies starter Vince Velasquez lasted only 2 1/3 innings, allowing three runs, four hits and four walks. Velasquez ran into trouble in the third when he walked Eovaldi with one out and hit Andrew Benintendi with a pitch. Holt reached on an infield single and Mitch Moreland lined a three-run double to left-center that skipped past Herrera and cleared the bases.

Devers appeared to score the go-ahead run in the sixth when he came around from second base to cross the plate after pinch-hitter Steve Pearce was ruled safe on a close play at first following a grounder to second. But a video review showed first baseman Justin Bour stayed on the bag as he stretched to catch a wide throw from Cesar Hernandez.

TRAINER’S ROOM

Red Sox: LHP Eduardo Rodriguez is slated for a rehab start Monday for Double-A Portland. Rodriguez has been on the disabled list since July 15 with a right ankle sprain. … 2B Ian Kinsler is expected to return Friday from a strained left hamstring.

Phillies: C Andrew Knapp was sent to Triple-A Lehigh Valley to make room on the roster for Ramos after he came off the disabled list.