MINNEAPOLIS -- On his 114th and final pitch of a blazing-hot Wednesday afternoon, Lance Lynn spun hard to his left, genuflected in the general direction of the outfield wall and ran his right hand through his beard in obvious frustration.

Missing just off the plate with a full-count fastball to Alex Gordon left Lynn with his 55th walk of the year, a total exceeded among American League pitchers only by wild young right-hander Lucas Giolito of the Chicago White Sox.

Ryan Pressly’s tightrope act in relief enabled Lynn to escape with the 8-5 victory over the miserable Kansas City Royals, but there was only a smattering of polite applause for Lynn as he left the Target Field mound for quite possibly the last time this season.

Barring a stunning surge back into contention, the Twins are likely to deal Lynn to any contender willing to roll the dice on a track record in St. Louis that was far more impressive than what he has done here as a hired gun.

“In this game I’ve learned that you go where you’re told because they pay you,” Lynn said. “That’s just the way it works, unless you’ve got a no-trade clause. Then you can tell ‘em: ‘No. No thanks. I’m good.’ Everyone else can just wear it and do what they’re told.”

Three more walks, a hit batter and two home runs - the latter matching his previous season total at home - sent Lynn on his way with a 5.22 earned-run average. He can still run it up there at 95 mph but too often he seems to miss his catcher’s target by feet rather than inches.

With approximately $5.23 million left on the one-year, $12 million deal he signed in mid-March after a long, strange winter of free agency, Lynn won’t break the bank of any interested trade partner. He also is on track to fall short of a pair of $1 million contractual bonuses he was due to receive upon reaching 170 and 180 innings, respectively.

Chased after five-plus innings once again, Lynn is averaging 5.07 innings per start and finds himself on pace for just 164 1/3 innings. That would be his lowest total for a full season since breaking in with the Cardinals in 2011, and the main culprit has been inefficiency leading to high pitch counts.

It took him 68 pitches to work through the first three innings in this one. By then he had put the Twins in a 4-2 hole, courtesy of Salvador Perez’s three-run homer in the first (398 feet) and Mike Moustakas’ solo blast (403 feet) on a full-count fastball in the third.

The Twins, now 6-1 on this homestand against AL bottom feeders with the improving Tampa Bay Rays coming in next, managed to rally against a Royals team that has gone 5-29 since the early days of June. Journeyman catcher Bobby Wilson drove in a pair of runs on his three-hit day, and Brian Dozier (15th) and Logan Morrison (11th) added homers in the sixth.

Even with their first-half struggles, Dozier and Morrison could be on the move in the coming days and weeks as the Twins look to retool for 2019 and beyond. Finding a market for Lynn, however, could be more problematic in light of his erratic performances.

He is 5-2 with a 3.27 ERA in 41 1/3 innings against the Royals, Baltimore Orioles, Detroit Tigers and Chicago White Sox, teams that entered the day a combined 124 games under .500. In his remaining 50 innings against everybody else, he is 2-5 with a 6.84 ERA.

To be fair, that also includes a combined 16 innings of one earned run against the AL’s three division leaders, but he managed to record an out after the fifth in just one of those starts (June 2 against Cleveland). As one scout from a contending team said Wednesday when asked about Lynn: “Back-end starters aren’t what we’re lacking.”

Keeping Lynn through the year doesn’t make sense for the Twins either as they aren’t able to make him a qualifying offer that could lead to a compensatory draft pick next June. Under the rules of the current Collective Bargaining Agreement, Lynn is exempt from qualifying offers for the remainder of his career after turning down $17.4 million from the Cardinals in November.

The Twins, meanwhile, forfeited their third-round pick after signing Lynn a month into spring training. It was worth a shot, especially with the AL Central shaping up as baseball’s weakest division by far.