The Twins blew a four-run lead against Boston on Tuesday night, but walked off with a 8-6 victory behind Chris Parmelee’s swing of redemption with two outs in the ninth.

Redemption for misplaying a sinking fly ball that cost his team a run.

Redemption for a lousy spring training in which he failed to make the team and was outrighted to Class AAA Rochester.

Parmelee, called up on Friday, socked a 95-miles-per-hour fastball from lefthander Andrew Miller into seats in right for a two-run homer to end the game. Kurt Suzuki, who had reached base with a two-out single, scored in front of him.

It’s the fourth walk-off home run in Target Field history, the first since Sept. 9, 2012. Parmelee joined Justin Morneau, Josh Willingham and Jim Thome with walk-off wallops.

“It’s huge,” said Parmelee, who went 3-for-4 in the game. “It’s one of those things that is a confidence booster.”

A few innings earlier, he felt like a zero. He rushed in to try to catch Shane Victorino’s sinking liner in the top of the sixth, but the ball carried more than he thought it would and had it deflect off his wrist and roll toward the warning track. Victorino legged out a triple. David Ortiz flipped a single to left to score Victorino to cut the Twins’ lead to 6-3 at the time.

All that did was get Boston started. The Red Sox came back in the seventh with three runs to tie the score on RBI singles by Victorino and Ortiz and a bases-loaded walk by Jonny Gomes. Twins manager Ron Gardenhire played reliever roulette in the inning, going through four pitchers just to get the final out.

So the game went into the ninth with Parmelee’s misplay looming large.

“I kind of take partial blame for that,” he said. “That was my run. If a defenseman can get [charged with] a run, that one goes to me.”

Miller entered the ninth inning throwing fire, striking out Trevor Plouffe and pinch hitter Chris Colabello. Then Suzuki got his single. Parmelee went up looking for a fastball to hit.

“I wanted to get something up in the zone I could handle,” he said. “I just wanted to hit something in the gap and watch Suzuki run.”

He got the bonus.

The Twins raced out to a 6-2 lead with a five-run second inning behind a two-run home run by Eduardo Nunez, a two-run double by Brian Dozier and an RBI single by Joe Mauer. Suzuki drove in Plouffe with single in the fifth.

But David Ortiz went Big Papi on Twins pitching, getting four hits and four RBI in his first four at-bats — a solo homer in the first, a solo homer in the fourth and RBI singles in the sixth and seventh. He now has 382 home runs with Boston, tying him with Jim Rice for third career.

“In our meetings we said. ‘Don’t let him beat you,” Twins manager Ron Gardenhire said before chuckling.

Well, technically they didn’t, as Parmelee — in his fourth game since being called up — helped the Twins win for the third time in their past four games.

“When you get late in the game, it doesn’t matter who does it,” Gardenhire said. “But I’m glad for Parm. He’s worked really hard.”