ST. LOUIS — Adam Wainwright struggled again. His defense struggled more.

Wainwright struggled for the third time in his last four starts, giving up seven runs — only two earned thanks to two key errors — as the St. Louis Cardinals lost to the New York Mets 10-6 on Thursday night.

However, Wainwright wasn’t going to let his defense shoulder the blame.

“It’s another game that we lose in which I start and the offense scores some runs,” Wainwright said. “I don’t know what else to say other than I’ve got to keep going.”

Cardinals manager Mike Matheny echoed the right-hander’s sentiment.

“I wouldn’t say that’s the whole story,” Matheny said. “We had a guy throw a good game against us and they capitalized on a couple, but that’s a lot of runs that you’re giving up that were hit hard. We made a good push and then hit some balls hard ourselves late and just not enough.”

Brandon Moss hit two home runs and Jedd Gyorko and Stephen Piscotty also connected as the Cardinals tried to chip away at a 7-0 deficit. St. Louis has hit seven home runs in its last two games and has a 14-game homer streak.

Wainwright (9-8) lost his glove trying to tag out Yoenis Cespedes in a bizarre play leading to the Mets’ four-run fifth.

Cespedes tried to go from first to third on a bloop single by James Loney. When several Cardinals chased the ball, Wainwright covered third base. Cespedes slid and his cleat pinned Wainwright’s glove to the bag — he would’ve been out, but when Wainwright pulled away his hand, the mitt stayed stuck under Cespedes’ foot.

Because Wainwright didn’t control the ball, Cespedes was called safe in a ruling upheld by replay. Moments later, Alejandro De Aza hit a three-run homer to make it 7-0.

“He said that when I pulled out the glove, I had to show possession,” Wainwright said. “I don’t know what else I could have done there; there was another runner on base. I’ve never seen it before, never heard of it before.”

De Aza’s fifth home run of the season came an inning after his two-run single gave the Mets a 3-0 lead. The five RBI is a career-high for the outfielder.

De Aza also made a jumping catch against the center field wall to rob Matt Carpenter of an extra base hit in the first inning.

“He knows his role,” Mets manager Terry Collins said. “He doesn’t have to like it, but he accepts it and he gets himself ready.”

Seth Lugo (1-2) pitched five scoreless innings for his first big league win. The Mets took two of three to win their first series at Busch Stadium since 2008.

Lugo gave up two hits and struck out five to earn his first win since May 10 at Triple-A Las Vegas. On Tuesday night, Mets reliever Robert Gsellman also posted his first big league win.

Together, Lugo and Gsellman helped the Mets win a road series from the first time since July 22-24 in Miami.

Lugo left the game with right calf cramp while warming up before the sixth. By then, he’d also gotten his first hit in the majors.

“I don’t think we were upset to see him come out of the game, even though I hope he’s not injured,” Moss said. “I’m not saying that we got some life when he came out of the game and we made a go at it, but they just kept putting runs up.”

James Loney got three hits and scored twice for the Mets. Loney is hitting .529 (18 for 34) against Wainwright for his career.

TRAINER’S ROOM

Mets: OF Jay Bruce (calf) was out of the lineup after leaving Wednesday night’s game with cramps. … LHP Jonathon Niese (left knee) underwent arthroscopic surgery to repair a meniscus tear.

Cardinals: Matt Adams (right shoulder inflammation) began a rehab assignment at Triple-A Memphis. He batted second and hit a two-run homer Thursday for the Redbirds.

UP NEXT

Mets: RHP Bartolo Colon (11-7, 3.36 ERA) will start off a 10-game homestand against Philadelphia. LHP Adam Morgan (1-7, 6.21 ERA) will start for the Phillies.

Cardinals: RHP Luke Weaver (0-1, 5.00 ERA) will make his third major league start, facing Oakland. The A’s will counter with Ross Detwiler (1-2, 5.91 ERA).