NEW YORK — Adam Wainwright won in a rare matchup of pitchers in their 40s as his St. Louis Cardinals blanked Rich Hill‘s New York Mets 7-0 on Monday night.

The 40-year-old Wainwright, a thorn in the Mets’ side since he saved Game 7 of the 2006 National League Championship Series by freezing Carlos Beltran with a curveball to escape a bases-loaded jam, allowed four hits in six innings. He walked three and struck out four.

The 41-year-old Hill allowed three runs and six hits in five innings, walking two and striking out four.

It was the first time starting pitchers 40 or older opposed each other since June 18, 2015, when 40-year-old R.A. Dickey started for the Toronto Blue Jays against the Mets and 42-year-old Bartolo Colon.

“The game’s gone younger, and 40’s quite a hallmark number to get to,” Cardinals manager Mike Shildt said.

Wainwright turned 40 on Aug. 30, while Hill, the oldest pitcher in the majors, turned 41 on March 11.

“He’s got a better fastball than me and potentially a better breaking ball,” Wainwright said. “He’s impressive. He got started later. He’s kind of figured it out in the last seven or eight years.”

Both pitchers displayed their versatile arsenals, which included fastballs in the high-80-mph range and plenty of curveballs clocked in the low-to-mid 70s as well as at least two sliders by Hill clocked in the high 60s.

“You expect a chess match — executing pitches, lot of pitches with intent, lot of mix,” said Mets manager Luis Rojas, who is two days younger than Wainwright. “Two guys that have been around in the league for a while now for a reason.”

The matchup marked the first time Wainwright opposed a pitcher older than him since Oct. 2, 2016, when he faced 39-year-old Ryan Vogelsong.

The Associated Press contributed to this report.