NEW YORK — If the New York Mets wind up reaching the NL wild-card game, at least they won’t have to face Julio Teheran.

They might actually prefer going up against All-Star ace Madison Bumgarner or Carlos Martinez — heck, even Juan Marichal or Bob Gibson.

Teheran shut down the Mets once again, pitching seven sparkling innings as the last-place Atlanta Braves blunted New York’s bid to extend its wild-card lead, holding on for a 5-4 win Tuesday night.

“Every time I face them, I’ve got a plan,” Teheran said.

And whatever it is, it works.

“He’s good. He’s an All-Star. It’s not just us,” Mets cleanup man Curtis Granderson said.

The Mets dropped into a three-way tie with San Francisco and St. Louis for the two NL wild cards. New York nicked the Braves’ bullpen for three runs in the eighth but couldn’t complete the comeback.

The Braves have the worst record in the NL, yet have a four-game winning streak. They beat the Mets for the second day in a row and have taken five straight at Citi Field.

Teheran (6-10) gave up five hits and left with a 5-1 lead, retiring 15 of his last 16 batters. Dating to the final time he saw the Mets last season, he’s 3-0 with a 0.73 ERA in five starts against them.

The 25-year-old righty improved to 7-3 lifetime against the Mets. In June, Teheran threw a one-hit shutout at this ballpark, and the two-time All-Star is 2-0 in four starts against New York this year.

As for Citi Field, “before I didn’t like it. Now, it’s one of my favorites,” Teheran said.

Teheran struck out a season-low one, but a couple of fastballs up and a couple more inside early in the game seemed to serve their purpose and keep the Mets off the plate.

“Strikeouts don’t matter to me,” he said.

Jim Johnson pitched the ninth for his 16th save in 19 chances. He struck out Yoenis Cespedes with a runner on first to end it, fooling the slugger badly with a sharp curve.

Granderson hit an RBI double during the Mets’ three-run rally in the eighth.

Freddie Freeman walked and doubled, giving him a 40-game on-base streak and a 24-game hitting string. Matt Kemp got his 100th RBI and Adonis Garcia hit a three-run homer in the seventh that made it 5-1.

The Braves have at least eight hits in 20 straight games, matching their longest run in a single season since moving to Atlanta in 1966.

Robert Gsellman (2-2) lost in his fifth major league start. The rookie took a 1-0 lead into the sixth before a misplayed flyball cost him.

After Atlanta loaded the bases with one out, Kemp lofted a catchable fly to right-center, but Granderson and Jay Bruce both backed off at the last moment and the ball fell for an RBI single. Josh Smoker relieved and walked Nick Markakis to force home the go-ahead run.

The Mets took a 1-0 lead in the third when Jose Reyes led off with a triple and Asdrubal Cabrera doubled.

ASCENDING ATLANTA

The Braves’ current winning streak began with two victories at home over NL East-leading Washington. With a 60-91 record, interim manager Brian Snitker likes his team’s approach.

“We’re playing like we’re fighting for the division,” he said.

IT’S A STEAL

Cabrera singled in the first inning and stole second with Tyler Flowers catching. Flowers has thrown out just one of 57 runners who have run on him this season.

TRAINER’S ROOM

Braves: RHP Mike Foltynewicz, out for more than a week after being hit on the left calf by a line drive, could throw a bullpen session in the next couple of days. Snitker would like to see him make a couple of limited starts before the season ends.

Mets: LHP Steven Matz (shoulder tightness), sidelined since Aug. 14, possibly could start Friday night at home vs. the Phillies. … INF Wilmer Flores (wrist) got another injection Monday. Manager Terry Collins hopes for a speedy return.

UP NEXT

Braves: RHP Ryan Weber (1-1, 5.46 ERA) is set to make his second start in the majors this year.

Mets: RHP Bartolo Colon (14-7, 3.14) leads the team in wins. The 43-year-old is 5-1 with a 2.21 ERA in his last nine starts.