There was a chance Dallas Keuchel was going to end up with the Yankees during his prolonged free agency before he signed with the Braves in June.

At this point, the Mets no doubt wish he ended up in The Bronx — and that Josh Donaldson had landed anywhere else when he was a free agent last offseason, as well.

Atlanta finished off a three-game sweep of the Mets at Citi Field with a 2-1 win on Sunday and it was the two veterans who led the way, with Keuchel tossing seven shutout innings and Donaldson hitting two more homers.

Keuchel has now blanked the Mets for 13 straight innings over a pair of starts in the past two weeks and Donaldson has hit nine homers off them this season — the most by a Mets opponent since Dave Kingman also had nine while with the Cubs in 1979.

“I’ve had some success against them,’’ Donaldson said after providing the Braves with all their offense Sunday. “I feel like I have a lot of respect for their pitching staff. They do a great job coming after you and they come after you in the strike zone. They have really good stuff and they know it, so they’re gonna challenge you. As a hitter, I always look forward to those types of challenges.”

And Keuchel relishes pitching in important games this time of year.

He sat out most of the first half of the season waiting for a contract that he and agent Scott Boras deemed acceptable before finally choosing the Braves over the Yankees when Atlanta made a more significant offer.

“I’m always appreciative of very good and talented teams willing to spend money to win,’’ Keuchel said. “There’s not a lot of teams that are willing to do that. It’s showing. There are a lot of subpar, average teams. … I’m not an owner and that’s not my job.”

After an inconsistent start to his season, Keuchel has been good in four of his past five outings — including the last three.

Keuchel didn’t allow a run in seven innings Sunday and pitched around three walks.

“He’s right there,’’ Atlanta manager Brian Snitker said of how close Keuchel is to being in top form. “He probably could have stayed out there and pitched all afternoon. … All he does is compete.”

And he’s helped the Braves stay in firm command of the NL East heading into the final month of the season.

“He’s been nails for us,’’ Donaldson said. “Exactly what I expected and today was really impressive.”

On a cool afternoon in Queens, Keuchel said he “barely broke a sweat.”

The reference was to the temperature, but the left-hander has shown the difference he can make to a staff.

“I’m personally having fun,’’ Keuchel said. “I know everybody else is, too.”