MINNEAPOLIS — These are the kind of games the Mets figured on winning all season: Keep it close with solid pitching early and then seize control with a big swing.

Dominic Smith provided the second part of that equation Wednesday by coming off the bench in the seventh inning and lofting a ball to right field against reliever Trevor May that just kept going. As it descended, it was clear the Mets had the big swing they needed. And they kept going. And going.

Smith’s three-run homer ignited a late-inning splurge that sent the Mets to a 14-4 victory and two-game sweep of the Twins at Target Field. The victory was the Mets’ fourth straight, matching their longest winning streak of the season.

“You don’t want to talk about the position player striking me out?” Smith said, referring to his ninth-inning at-bat against infielder Ehire Adrianza that resulted in a whiff. “My day is ruined.”

Smith expected the razzing for the strikeout to reach epic levels from his teammates in the next few days. But Smith and the Mets could at least smile, knowing they decimated the AL Central leader.

The Mets (44-51) will open a four-game series in San Francisco on Thursday needing only a victory to guarantee a winning road trip. But the Mets will need to continue winning series if they still want to chase the flicker of hope that is their wild-card chances. Fangraphs puts the Mets’ postseason probability at 8.9%. The Mets began the second half with a 5.4% probability.

“We’re inching closer and closer, it’s not out of the realm of possibility,” manager Mickey Callaway said.

Leading 5-3, the Mets added six insurance runs in the eighth after left fielder Eddie Rosario dropped Adeiny Hechavarria’s routine fly ball that should have been the final out. Two runs scored on the play, and Jeff McNeil later stroked an RBI double. Smith added further cushion with an RBI single before Pete Alonso launched a 474-foot blast to left field for his first homer since returning from the All-Star Game. The Mets piled on three runs in the ninth with the infielder Adrianza on the mound for the Twins.

All of it was plenty for the Mets bullpen, with Jeurys Familia and Chris Mazza combining to contain the Twins for the remainder.

In the go-ahead seventh, Amed Rosario (4-for-4) singled to reach base for the third time and Hechavarria smashed a double to deep center, leaving runners on second and third. McNeil was retired before Smith pounced on an 0-2 curveball for his ninth homer.

“Having Dom come off the bench is a valuable thing,” Callaway said. “That kind of got things where it needed to be.”

Smith, who has become the team’s primary left fielder in recent weeks, started the game on the bench with lefty Martin Perez pitching. But he knew enough to stay ready.

“We had them on the ropes right there and had an opportunity to take the lead,” Smith said.

Jason Vargas kept the Mets in the game by allowing three earned runs on five hits over six innings. The lefty, who is a trade candidate heading toward the July 31 deadline, was coming off a clunker against the Marlins on Friday in which he surrendered six earned runs over five innings.

Mitch Garver’s fifth-inning homer was the second allowed by Vargas on Wednesday and gave the Twins a 3-2 lead. It ensured Vargas of a third straight start of allowing at least three earned runs after surrendering fewer than that number in six of his seven previous outings.

Miguel Sano’s throwing error on an Alonso grounder leading off the fourth led to the Mets scoring an unearned run to tie it 2-2. The Mets loaded the bases with nobody out in the inning, but got only one run, when Todd Frazier hit into a double play. Wilson Ramos doubled in the inning and Robison Cano was drilled by a pitch.