Jordan Lyles was near-perfect Tuesday afternoon, sitting down the first 22 Colorado Rockies hitters he faced before Trevor Story broke up the perfect game in the eighth inning.

It wasn’t perfect, but the 4-0 win marked was the second-best game pitched in San Diego Padres history, the only team who has never enjoyed a no-hitter in Major League Baseball. For Lyles, who spent four years in the Rockies organization, it must’ve been a dream-come-true kind of performance — his outing marked the longest a perfect game bid has ever gone against Colorado.

When Story singled off Lyles with one out gone in the eighth, the Padres’ pitcher had struck out 10, making quick work of the Rockies, inning after inning. Without a doubt, it was his best performance in his eight-year career, previously going perfect through only four innings on two different occasions. It was also the 29th one-hit game in Padres history.

Offensively, San Diego gave Lyles support early, as Eric Hosmer hit a two-run homer in the first inning and Christian Villanueva followed it up with a two-run bomb of his own in the bottom of the sixth.

For the Rockies, after Story’s single and Lyles was pulled in the eighth, the away team was able to load the bases when Pat Valaika and Charlie Blackmon each walked. But Ian Desmond — who’s struggled mightily all season long — put the bat on the ball only to knock it straight to center fielder Manuel Margot.

With the 4-0 loss, it’s the second time in less than a week Colorado has been shut out, as the offense continues its roller-coaster ride that finds them mostly down in the dumps. Their .229 team batting average ranks only 27th in all of baseball, and they sit as the fifth-worst team in the MLB in terms of strikeouts with 397 (9.2 per game). The Rockies were struck out 12 times on Tuesday afternoon, raising their tally to 72 in their last seven games — the Rockies are 2-5 in that span.

The loss means that the Rockies split the two-game mini-series in San Diego fell to 23-20 on the season, 16-9 on the road.

After a much-needed day off on Wednesday, Colorado heads up the coast to San Francisco for a four-game series against another divisional rival, in yet another difficult ballpark for hitters.