The Colorado Rockies and San Diego Padres engaged in a good, old-fashioned pitchers’ duel at Petco Park on Thursday to wrap up their four-game series.

Tyler Anderson rebounded from a rocky first start with six-plus innings of shutout baseball, striking out four and walking none, while rookie Joey Lucchesi matched Anderson nearly pitch for pitch.

The two sides did not plate a run until a dramatic ninth inning that produced a 3-1 Rockies victory.

The win secured a series win for Colorado and ensured their first road trip of 2018 was a winning one.

Colorado put a pair of runners on base in the first and second innings, but could not capitalize. Charlie Blackmon hit a soft single to open the game, then was picked off first by Lucchesi. The next three Rockies to reach base did so via walk, DJ LeMahieu in the first, then Gerardo Parra and Pat Valaika in the second. Colorado couldn’t capitalize on Lucchesi’s early lack of command, though, and the young lefty settled down to retire the next 11 hitters in a row.

It looked like the Rockies might catch a break and get something going in the fifth when Pat Valaika laid down a bunt for a base hit. The throw from Lucchesi’s got away from Eric Hosmer at first as Valaika barreled down the line, but Valaika was ruled out for interference.

LeMahieu finally broke through with a one-out hit in the sixth against Phil Maton, although it was of the infield variety on a slow roller between short and third that Christian Villanueva couldn’t handle. Nolan Arenado reached on an error by Villanueva when the third baseman couldn’t handle the exchange on a chopper down the line. Maton struck out Ian Desmond and got Trevor Story to fly out to center to keep things scoreless.

Craig Stammen worked a clean seventh, then worked his way into and out of a tricky spot in the eighth.

Blackmon singled with one out, then stole second and advanced to third on a bad throw. LeMahieu couldn’t drive him in, though, nor could Ian Desmond after Stammen intentionally walked Arenado.

Anderson did not allow a hit through 3.2 innings, thanks in part to some stellar defense behind him. Trevor Story made a pair of leaping grabs — one in the second and one in the third to save potential hits, and Nolan Arenado took away a potential double down the third-base line from catcher Austin Hedges in the bottom of the third. It was a classic Arenado snare, plucking the ball out of mid-air just inches off the ground and falling into foul territory.

Hosmer broke up Anderson’s no-hit bid in the fourth, but the Padres’ first real threat came in the fifth.

Freddy Galvis and Carlos Asuaje strung together one-out base hits, bringing Hedges to the plate with the chance to do some damage. The young catcher fouled off four two-strike pitches, but Anderson ultimately prevailed, getting Hedges to swing and miss on an 84-mph cutter. Pinch-hitting Colorado native Chase Headley struck out looking on another cutter, this one a 2-2 offering beautifully painted on the outside corner to end the inning.

Anderson worked a 1-2-3 sixth, but gave up a leadoff single to Renfroe in the seventh to end his day. Adam Ottavino came in and struck out Villanueva. Parra then made perhaps the play of the day, diving to stop a sinking Galvis base hit to right and then coming up throwing to cut down Refroe at third base. Chris Iannetta cut down Galvis trying to steal second base, ending the inning.

Ottavino worked a clean eighth to set up the dramatic ninth inning.

Finally, in the ninth, Colorado broke through against lefty Brad Hand. The Padres’ closer walked the first two hitters he faced, Story and Desmond, then Parra reached on an attempted sacrifice bunt when Asuaje bobbled the throw at first. Carlos Gonzalez struck out pinch hitting for Ottavino for the first out of the inning. Hand appeared to paint the corner multiple times against Ryan McMahon, but the rookie earned a four-pitch walk to score the game’s first run. Hand struck out another lefty, Blackmon, but LeMahieu delivered a two-out opposite-field single to drive in Desmond and Parra to give Rockies closer Wade Davis a little breathing room. Jordan Lyles got Arenado to fly out to end the inning.

Davis would be thankful for that cushion after giving up a leadoff home run to Manuel Margot. The Rockies’ new closer was making his fourth appearance in six days, but battled back to earn his fourth save. Story made a nice barehanded play to get Pirela on a chopper up the middle for the first out. Davis then struck out Hosmer and Renfroe to end it.

Ottavino (1-0, 0.00 ERA) picks up his first win on the year. The hit he allowed was his first in 5.0 innings pitched in 2018. He has struck out 10 batters in the 15 outs he has produced.

Hand (0-2, 6.75) took the loss, although none of the three runs he allowed were earned.

The win sends the Rockies home with a winning record on their first road trip of the year. Colorado is now 4-3, while San Diego falls to 1-6. The 3-1 series win was Colorado’s first of the season.

NEXT UP: Colorado opens it’s home slate in what is expected to be a wet and cold game at Coors Field. German Marquez (0-0, 0.00) gets the start in the home opener. He will face Atlanta’s Brandon McCarthy (1-0, 3.38). First pitch is scheduled for 2:10 p.m. MDT. The weather forecast calls for rain showers in the morning turning to snow in the afternoon, with a high of 44 degrees.