MLB

Gee holding on tight to Mets rotation spot after strong outing vs. Cardinals

A team that knows only lose-lose might be facing a rare win-win scenario.

Dillon Gee and Jeremy Hefner remain locked in a dogfight for the final spot in the Mets’ rotation after Zack Wheeler finally arrives next week, with both candidates performing lately as if their careers depend upon it.

Gee did nothing Wednesday to hurt his chances, allowing one run over 6 2/3 innings in his team’s 5-1 victory over the Cardinals at Citi Field that snapped the Mets’ three-game losing streak.

It came a night after Hefner allowed one earned run over six innings in a loss to the Cardinals. But five unearned runs scored against Hefner following a Daniel Murphy error.

In his last three starts, Gee is 3-0 with a 1.29 ERA and 1.00 WHIP. Hefner has excelled over his last four starts, going 1-1 with a 2.52 ERA and 1.12 WHIP.

Manager Terry Collins expects to use a six-man rotation for one turn after Wheeler arrives from Triple-A Las Vegas to make his major league debut on Tuesday in Atlanta and then decide between Gee and Hefner for the last vacancy. The loser of that battle will likely head to the bullpen.

Lucas Duda, David Wright and Marlon Byrd all homered, helping the Mets survive on only six hits. Phenom Shelby Miller (7-4) struck out 10, but allowed four earned runs on five hits over six innings.

Wright homered in the sixth to complete the Mets’ scoring against Miller before Byrd added a solo blast in the seventh against Seth Maness

Duda’s solo homer in the fourth had extended the Mets’ lead to 3-0. Of Duda’s 11 homers this season, 10 have come with nobody on base.

The Mets scored twice in the first against Miller, with Daniel Murphy and Duda each delivering an RBI single after Wright doubled with two outs.

Gee (5-6) allowed six hits and two walks and struck out seven. The right-hander departed with two outs in the seventh, after walking Matt Carpenter, and watched Scott Rice retire Carlos Beltran for the inning’s final out.

mpuma@nypost.com