Although Travis Jankowski patrolled centerfield at Stony Brook University and Steven Matz toed the rubber at nearby Ward Melville High School, they never crossed paths. Matz, 25, graduated in 2009 and Jankowski, 25, began his Stony Brook career in 2010.

Jankowski had heard plenty about Matz from his teammates, but the two never faced each other until Sunday’s 5-1 Mets victory at Citi Field. It’s safe to say that Matz got the better of the matchup.

“Man, he was on,’’ said Jankowski, who went 0-for-3. “He might have had some nerves early on [he walked Jankowski to start the game], I don’t know, but he settled down.”

Matz had a no-hitter going before Alexei Ramirez singled with one out in the eighth to spoil the bid. Manager Terry Collins then pulled him with his pitch count at 105.

The Padres were happy to see him go.

“He was good, no doubt about it,” Padres manager Andy Green said. “You could tell he had a feel for just about everything today. He was down 3-1 in a few counts, flipping in curveballs.”

Matz fired 68 pitches for strikes and struck out eight. Wil Myers fanned three times in three at-bats against him before he singled and scored against Gabriel Ynoa in the ninth.

advertisement | advertise on newsday

“He threw the ball really well against me, didn’t really make any mistakes out over the plate,” Myers said. “The two that he did, I was auto-taking just to get some timing down. After that, he didn’t make any mistakes.”

Matz was in the type of groove that’s nearly impossible to break. He worked a brisk pace and pounded the strike zone, walking only Jankowski to lead off the game and Derek Norris to lead off the sixth.

Jankowski was consciously trying to get Matz off his game, but to no avail.

“You kind of want to wait him out and be patient and wait for him to make a mistake,” Jankowski said. “What I try to do is get him off his rhythm a little bit, you know, call time out, square around to bunt, just try to play a little mental game with him. But that didn’t work, either.”

San Diego, which ranks near the bottom of the National League in team batting average (.240), was a bit weak five through eight in the order — rightfielder Jabari Blash (.176), shortstop Ramirez (.238), catcher Norris (.189) and second baseman Adam Ro sales (.201). They went 1-for-11 with a walk and three strikeouts.

Mets videos

The San Diego hitters were aggressive at times and far too patient at others, sometimes swinging out of their shoes and other times letting first-pitch fastballs go right down the middle.

Myers was particularly confounded in his three at-bats against Matz. Still, the competitor in him was hoping for another chance.

“I’d liked to have faced him again,” Myers said. “I would have liked to think I could have got him on the fourth time.”