NEW YORK (AP) -- Adam Wainwright used to be a creature of routine leading up to each start.
''Same sleeping shirt the night before,'' the St. Louis Cardinals ace said. ''I couldn't wear blue jeans. I had to wear the color red. Are you kidding me? It was ridiculous. If I didn't have any of that, or worse, if something was thrown off, then instantly I was thinking, 'Oh, man, I'm in trouble.' And that's ridiculous. It has nothing to do with getting anyone out. I figured that out somewhere along the line.''
With rain falling in the morning and clashing forecasts for the afternoon, Wainwright wasn't sure whether he'd pitch at all Thursday.
Cardinals manager Mike Matheny told him about 80 minutes before start time to get ready, so Wainwright shortened his pregame routine and then pitched seven scoreless innings to become the major leagues' first 10-game winner. In a classic pitching matchup, his 2-1 victory over the New York Mets sent Matt Harvey to his first loss of the season.
''We had two Cy Young candidates going at each other,'' said Matt Carpenter, who tripled in the go-ahead run in the third and preserved the lead with a sparkling stop at second base in the ninth.
Some forecasts had predicted up to 3 inches of rain.
''Two days ago, they were talking about we were going to need to build an ark,'' Matheny said. ''That's tough on the starting pitcher. As he's walking through here an hour-and-a-half before the game, he's completely out of his routine because he's hearing conflicting stories of what's going to happen with weather. But he got his mind together and got into an abbreviated version of his routine and went out and executed.''
After expecting a rain delay, Wainwright did his preparation and warmup - ''kind of a ground routine; it's not gymnastics, it's just stretching'' - in the clubhouse instead of on the field.
''My whole normal pregame routine was kind of thrown out the window,'' he said.
Wainwright (10-3) retired his first 11 batters before David Wright's single and allowed four hits, struck out six and walked two - including an intentional pass that caused the Mets to pinch hit for Harvey in the seventh. He tied his career best by winning his fifth straight start, dropped his ERA to 2.18 and got his 1,000th strikeout when Wright was called out on a first-inning curveball.
''It wasn't much fun to be an offensive player today,'' Wright said.
Known best in New York for freezing Carlos Beltran with a called third strike to end Game 7 of the 2006 NL championship series, Wainwright had been 0-4 with an 8.46 ERA in four starts against the Mets since his only career win against them, in St. Louis on April 18, 2010.
''I had everybody in the world tell me I had never beat the Mets at their stadium, so it was something I wanted to do,'' Wainwright said.
Trevor Rosenthal pitched the eighth, and Edward Mujica allowed a long home run to Marlon Byrd with one out in the ninth. John Buck doubled and took third as Kirk Nieuwenhuis grounded to Carpenter, who made a diving backhand stop as he fell and threw to first for the out.
''When it was hit, I thought he had a good chance of getting a base hit up the middle.'' Carpenter said.
Josh Satin fouled off two full-count pitches and swung over a splitter as Mujica remained perfect in 19 save chances.
Harvey (5-1) had given up one run and five hits in seven innings with seven strikeouts and a walk, ending a 14-start unbeaten streak dating to Sept. 12 but lowering his ERA to 2.04.
''He's as good as you're going to face in the big leagues,'' Carpenter said. ''He's got electric stuff. ''
Harvey had no-decisions in eight of his previous nine starts, and the Mets have scored just 18 runs while he's been in the game during his last 10 outings, according to STATS.
''If I go seven zeros, we're still playing the ballgame.'' Harvey said. ''It's an incredible lineup. You really have to be locked in one through nine.''
St. Louis went ahead in the third when Pete Kozma hit an opposite-field single to right for the first hit of the game and Carpenter tripled past Byrd, who tried for a sprawling catch in right but allowed the ball to bounce past him.
New York's bullpen gave up a run in the eighth, when Carpenter and Beltran singled off Scott Rice, and Matt Holliday and Allen Craig singled against LaTroy Hawkins.
A day of dazzling defense included Craig's diving stop at first base in the eighth to rob Omar Quintanilla of a hit, two nifty pickups by Daniel Descalso on slow rollers to third in the seventh and a pair of challenging catches by center fielder John Jay. He ran to the warning track for Lucas Duda's two-out drive with a runner on second in the fourth and nabbed a wind-blown drive by Jordany Valdespin leading off the sixth.
''Our guys played a flawless game,'' Wainwright said.
Next month, Wainwright and Harvey could find themselves in the same clubhouse at Citi Field - on the NL All-Star team.
''That's a long time from now,'' Wainwright said. ''I've got to get a lot of different hitters out before I start worrying about All-Star hitters.''
NOTES: St. Louis took two of three in the series and improved the big leagues' best record to 43-23. ... Craig has 49 RBIs. ... Kozma had three of the Cardinals' 10 hits.