It was 929 days ago, on a cold afternoon in December 2018, that Manny Machado’s free-agent tour stopped at Citizens Bank Park for a meeting with Phillies officials. Accompanied by his wife and his agents, the star third baseman walked up to the main entrance and tugged at the handle only to find it locked.

Sunday, he all but kicked it down, at least metaphorically.

Machado blasted two home runs — a two-run shot in the first inning and a three-run number in the third, both against starter Vince Velasquez — to account for the San Diego Padres’ early offense in an 11-1, Fourth of July thumping that prevented the Phillies from completing a three-game sweep in their final home game before the All-Star break.

» READ MORE: Phillies will have two All-Stars in Zack Wheeler, J.T. Realmuto

Instead, the Phillies reached the mathematical midpoint of the schedule with a 39-42 record, the first time since 2017 that they’ve had a losing mark through 81 games. They are five games behind the division-leading New York Mets in a weak National League East and 8½ games back in a race for two wild-card spots that most likely will come from among the Padres, Los Angeles Dodgers, and San Francisco Giants, the trio of NL West powers.

It was an appropriate way for these Phillies to reach the halfway mark.

They finally had their optimal lineup together for a couple of games, but left fielder Andrew McCutchen exited in the top of the ninth inning with tightness in an oblique muscle in his side after retrieving Eric Hosmer’s two-out, three-run double against embattled reliever Héctor Neris in the midst of a heavy downpour. And after appearing poised to go on a run with back-to-back wins over the Padres, they were done in by a superstar with whom they flirted three winters ago in a holiday clunker before an announced crowd of 25,592.

“We’ve kind of been up and down as a team,” Velasquez said. “Coming up against a team like this, we’re right there. I’ve always said that. I’m optimistic. Coming into this series, taking two of three, that’s a good sign.”

One step forward, one back. It’s how the Phillies have done it for what, four seasons now — and especially the last two. In 141 games since Joe Girardi took over as manager, they haven’t won more than five games in a row. Newborns do better with rolling than John Middleton’s $200 million team.

Three years ago, it seemed like Machado would be part of all this. But the Phillies passed on him after a protracted free agency that landed him in San Diego for 10 years and $300 million and instead signed Bryce Harper to a 13-year, $330 million deal.

» READ MORE: Andrew McCutchen should be playing for a contender this summer. It just may not be the Phillies.

Machado and Harper, friends from their days as teenage prospects, will forever be linked by their free-agent winter. And their numbers since achieving their big paydays are remarkably similar. Entering play Sunday, Machado slashed .266/.342/.485 (.827 OPS) with 61 homers, 184 RBIs, and 8.5 wins above replacement with the Padres; Harper with the Phillies: .264/.383/.517 (.900 OPS) with 62 homers, 173 RBIs, and 8.0 WAR.

Harper homered and drove in a run with a sacrifice fly in the Phillies’ 4-2 victory Saturday night. A day later, it was Machado’s turn.

Machado teed off on a full-count, 94-mph fastball from Velasquez and crushed it to straightaway center field to give the Padres a 2-0 lead in the first inning. He got another chance in the third after Velasquez issued back-to-back two-out walks. After fouling off three consecutive pitches, Machado timed up a 93-mph fastball and hit it out to left-center to make it 5-0.

“You don’t want to walk people in front of Machado,” Girardi said. “Vinny after that settled down pretty nicely. He made some mistakes with this fastball and Machado hit him today. Machado seemed to be locked in the whole series against us.”

» READ MORE: Phillies president Dave Dombrowski is confronting a similar situation to what Pat Gillick faced 15 years ago | Bob Brookover

Everything after that — from newly minted All-Star J.T. Realmuto’s opposite-field homer in the sixth inning, to the Padres’ six runs in the ninth against Héctor Neris, and backup Andrew Knapp’s one-out appearance as a pitcher — was elementary.

One step forward, one back, and seven games to go until the All-Star break, with questions about McCutchen’s availability up in the air. The veteran left fielder was their most consistent hitter in June. Now, the Phillies will reevaluate him before Monday night’s game in Chicago.

“The next guy’s got to step up if Cutch goes down for a few days or whatever,” Girardi said. “Hopefully he’s OK.”

Said Velasquez: “I don’t think it’s time to put our heads down at this moment. Offensively, some guys are struggling here and there. But we’re coming to the end of the first half, and we’re going to figure some stuff out.”

Extra bases

The Phillies are 105-105 all-time on the Fourth of July, including 51-49 at home. ... With four games in Chicago and three in Boston before the All-Star break, the Phillies don’t return home until July 16 for a doubleheader against the Miami Marlins. ... Left-hander Matt Moore (0-1, 5.79 ERA) will start the series opener at Wrigley Field against Cubs right-hander Zach Davies (5-5, 4.32).