SAN DIEGO — Jacob deGrom knew he was a mess.

On every pitch, he sensed his body falling off to the first-base side, a command-wrecking fault that he said also “puts a lot of stress in places where it doesn’t need to be.” He wasn’t sure if he had thrown a single changeup for a strike.

So when it was over, deGrom went straight to the video room for a postmortem. For all the talk about his missing velocity, he encountered a new problem: missing command.

StoryHomer-happy Mets cashing in on powerballStoryRay Knight ready to return to Flushing, Mets

“I just wasn’t able to locate,” deGrom said after the Mets’ 5-3 loss to the Padres on Thursday night. “It wasn’t a very good night.”

Indeed, the Mets began an 11-game West Coast swing with a forgettable evening. Padres righty Colin Rea held the Mets hitless for the first 6 2⁄3 innings before allowing Yoenis Cespedes’ single to rightfield against the shift.

In the ninth, Rea allowed a solo shot to centerfield by Curtis Granderson. Two batters later, Cespedes added a dash of intrigue with a two-run shot to leftfield off Brad Hand, who entered in relief of Rea.

advertisement | advertise on newsday

But Padres closer Fernando Rodney put an end to the madness by getting the final two outs, giving the Mets their third loss in their last five games.

Mets pitchers entered the game having allowed a league-low 12 homers, but Wil Myers and Derek Norris hit solo shots. Rea added a two-out RBI single in the second, Alexei Ramirez had a two-out RBI double in the third, and the Mets also allowed an unearned run in the sixth on Michael Conforto’s two-out throwing error.

Meanwhile, deGrom endured his worst start of the season, allowing a season-high three earned runs in a season-low five innings. He gave up eight hits, tying a season high.

Mets videos

“He got too much plate on the pitches he needed to get outs on,” manager Terry Collins said.

Until Thursday night, deGrom could shrug about all the panic regarding his velocity. After all, he had produced results. He entered his fourth start of the season 3-0 with a 1.02 ERA.

But the Padres punished deGrom, who worked with little margin for error, especially without his command. His fastball lingered in the 92-mph range, well off the 95 mph he averaged a season ago. He missed spots with his off-speed pitches and lamented the hail of hits that came with two strikes.

Through his first three starts, deGrom had allowed only one extra-base hit, and that was a double. But two batters into his night against the Padres, Myers ripped a solo shot to straightaway centerfield. Two batters later, Brett Wallace banged a double off the rightfield wall, setting the tone for a rough evening.

“No excuse,” deGrom said. “I just wasn’t very good tonight.”

advertisement | advertise on newsday

Through it all, he shook his head and muttered on the mound, betraying his usual demeanor. Every movement revealed another sliver of frustration until it was finally over.

While deGrom fretted, Rea spent the evening in cruise control. He could thank his defense.

In the third, centerfielder Jon Jay ranged deep into the gap in left-center to take away a sure extra-base hit by Granderson. From the mound, Rea acknowledged the gem by waving his cap.

In the sixth, Granderson lost another hit when shortstop Ramirez, shifted to the right side of second, made a nifty sliding stop. It was one of several times that the Padres deprived the Mets of a hit because of the shift.

Of course, a shift would later end the no-hit bid. Cespedes’ seventh-inning single came with just one infielder — first baseman Myers — playing on the right side. The crowd at Petco Park extended a loud ovation for Rea, who allowed one run in eight innings-plus.