MILWAUKEE — Neil Walker stood on the grass, his hands on his knees, doubled over with a glazed look on his face. The Mets second baseman had just been struck square in the chest by a one-hop rocket, clocked at 107 mph off the bat of the Brewers’ Hernan Perez.

The ball caromed and trickled to his left, far enough for Kirk Nieuwenhuis to beat Walker’s throw home and cut the Mets’ lead in half.

But for the moment, the main concern wasn’t the run in what became the Mets’ 5-2 win over the Brewers. At a time when every game seemingly costs something, it was Walker who provided the most tense moment of the evening.

After lingering on the field for a minute or two, the trainer returned to the dugout, Walker straightened himself and stayed in the game. But when his turn came to bat in the ninth, Walker was lifted for a pinch-hitter, Matt Reynolds.

With that, even on an encouraging night, the Mets were forced to brace themselves for another potential loss to a lineup that is already missing David Wright, Lucas Duda and Travis d’Arnaud.

Bartolo Colon, the savvy veteran, put on a master class in limiting damage. He allowed eight hits but kept the Brewers to just one run in seven innings. He helped himself by coaxing three timely double plays and ended an inning by picking off Scooter Gennett at first base.

Curtis Granderson, who began the day hitting .203, blasted his 11th homer of the season and his sixth to lead off a game. He tied Jose Reyes’ franchise record with six leadoff homers.

Yoenis Cespedes finished with two hits including an RBI single, a sign that he may be thawing from a cold snap.

And with the Mets leading 2-1 in the eighth, catcher Kevin Plawecki delivered the biggest hit of the night. With the bases loaded, Plawecki bounced one past a diving Jonathan Villar at shortstop, scoring James Loney and Asdrubal Cabrera to give the Mets a 4-1 lead.

It was a big hit for Plawecki, who lugged a .200 batting average to the plate. He has increasingly ceded playing time to the veteran Rene Rivera, who is known primarily for his defense.

When the Brewers got a run back in the eight on Gennett’s RBI double, the Mets answered in the ninth. Given a chance to hit, Reynolds knocked doubled in a run.

The hit scored Juan Lagares, the centerfielder who entered as a defensive replacement the previous inning and hit for himself in the ninth inning. It was his first game action since suffering a partial tear of his ligament while making a diving catch on Saturday.

Lagares bounced one back through the box, then motored hard around first before sliding into second, putting himself into position to score.

For one night, rather than add to the growing ranks of the walking wounded, the Mets actually appeared to regain a piece.

But that may have turned out to be a mirage.

Walker, 30, has been a revelation for the Mets. Entering play, he ranked second on the team with an .842 OPS, behind just Cespedes for the team lead. But his removal caps what has been a rough few days.

A Pittsburgh native, Walker was swarmed during his homecoming against the Pirates, the franchise that drafted, developed and then ultimately traded him away. He had just one error on the season before committing three in two days against the Pirates.

Now, the Mets must sweat out another possible injury to a key cog.