The Red Sox looked to be trending in the right direction after winning five straight games, including a sweep of the Baltimore Orioles.

But then the Philadelphia Phillies came to town.

Boston was ahead 2-0 on Wednesday night until things fell apart and Philly took a 3-2 lead en route to an eventual 5-2 win at Fenway Park to complete the two-game sweep.

The Red Sox had chances to take the lead or tie the game in the fourth when they loaded the bases, and again in the eighth when they had runners on second and third. But they came up short each time and were unable to put the ball in play when they needed to most.

“It wasn’t a great night,” manager Alex Cora said, as seen on NESN’s Red Sox postgame coverage. “The funny thing is we had a chance to win the game. And we can’t have nights like that as a team. (It was) one of those that started off good and we left the bases loaded. The game changed right away. They hit the double and the wild pitch and the throw to third, it just kept going. Rick (Porcello) made some good pitches to (Bryce) Harper and then left, I think it was a backdoor slider, and he hit it out of the ballpark. We can’t afford those. It’s a tough one to swallow, obviously, knowing where we’re at. Now we have to turn the page quick and be ready for tomorrow.

“Today was just not good baseball,” he added. “But overall it’s been what we’ve been throughout the season, the ups and downs, we’ve being inconsistent. I’ve been saying all along, for us to get that streak we’ve been talking about from the get-go we have to be more consistent. We got hot for five days and then (Tuesday) was a good game overall, but today we made some mistakes and with teams like that you can’t do that.”

Boston was playing some of its best baseball heading into the quick two-game set with the Phillies, but it didn’t go nearly according to plan as opportunities to score were squandered in both games.

Here are some other notes from Wednesday’s Red Sox-Phillies game:

— The Red Sox were swept by the Phillies for the first time since 2003.

— Rick Porcello now is 11-10 on the season with a 5.49 ERA. The right-hander has been anything but consistent this season, much like the Red Sox for the entirety of the year.

“It’s been going on all year, honestly,” Porcello said on NESN’s Red Sox postgame coverage. “We’ve had a hard time getting on a roll and extending winning streaks and winning series and doing that for a long period of time. It just hasn’t happened for us.”

“We prepare the same way we’ve been doing it for a year-and-a-half,” Cora added, “And right now it seems like … first of all we’re not putting the ball in play in certain situations and early in counts when we have pitches to hit. And then we get in that hole with two strikes … it’s one of those we should be better at in what we’re doing right now.”

— Boston resumes its suspended game from Aug. 7 on Thursday afternoon against the Kansas City Royals. The contest will pick up in the bottom of the 10th inning.

It’s been quite a while since the Red Sox played a suspended game that was not made up the following day.

— Rafael Devers continued to be a bright spot for Boston as he picked up his 102nd RBI after his 1-for-4 performance in the loss.

The third baseman leads the American League in that category, with Los Angeles Angels outfielder Mike Trout sitting in second with 98. Devers is tied for the league-lead with Atlanta Braves first baseman Freddie Freeman.

Thumbnail photo via Greg M. Cooper/USA TODAY Sports Images