– The Twins on Friday reached a deal with free-agent utility player Marwin Gonzalez, a transaction that strengthens the lineup but raises some questions.

The two-year, $21 million contract will be official when Gonzalez passes a physical, according to two major league baseball sources.

The move adds one of the game’s most versatile players to the roster. Gonzalez, 29, started 136 games for the Astros last season, with at least 24 starts at four different positions. In his major league career, he has played 291 games at shortstop, 191 at first base, 110 at second, 93 at third and 159 in the outfield.

He hit .247 with 16 home runs and 68 RBI last season after career-high numbers of .303, 23 home runs and 90 RBI when Houston won a World Series in 2017. His game-tying home run in the ninth inning of Game 2 of the 2017 World Series off Dodgers closer Kenley Jansen is considered one of the biggest moments in Houston history.

So where will Gonzalez play?

He can allow the Twins to spell third baseman Miguel Sano, who is coming off an injury-plagued season and is recovering from a laceration across the back of his foot. Sano also could be freed up to spell Nelson Cruz at designated hitter or C.J. Cron at first base. Gonzalez can spell any of the outfielders — although he has spent the majority of his outfield time in left.

A switch-hitter, Gonzalez broke into the majors in 2012 as part of a 103-loss Astros team in their last season in the National League. He spent seven seasons with the Astros, where he was one of the team’s most popular players.

Astros pitcher Lance McCullers Jr. tweeted: “Good luck and CONGRATS to one of the most underrated players in the history of baseball. Your impact on our club house and team will be lasting. One of the most clutch hitters and best defenders around.”

Bench pressed

Gonzalez is a career .266 hitter against righthanded pitchers and .258 against lefthanders. Last season, those splits were more extreme, as he batted .235 against righthanders and .273 against lefties. But with potentially as many as five righthanded hitters in the Twins lineup — six on days catcher Mitch Garver starts — Gonzalez can provide balance.

If Gonzalez opens the season as part of a four-man bench, Ehire Adrianza, Willians Astudillo or Jake Cave could end up in Class AAA Rochester. After the first two weeks in April, the Twins could shift to a 13-man pitching staff; that makes Gonzalez’s versatility even more valuable. Will the Twins keep Cave on the major league roster if Gonzalez is the first-choice outfielder?

Adrianza is still not 100 percent following offseason surgery on his left shoulder. The injury affected Adrianza’s follow-through while batting righthanded, forcing the switch-hitter to bat lefthanded against lefthanded pitchers during the final weeks of last season. He’s been icing the shoulder since arriving at camp and will only bat lefthanded during spring training games. Surgery took place on Oct. 9, and he was told recovery would be six to eight months.

“Everybody knows I can’t hit righthanded right now,” Adrianza said, “so they might have to figure out who’s pitching to decide if I play.”

Moving parts

There are indications that the Twins are willing to swing a deal during the season to create an everyday playing spot for Gonzalez. Even if that is true, injuries are inevitable, and Gonzalez could find himself being an everyday player while filling in for teammates on the injured list. That could reduce the need to make such a deal.

There is a chance the Twins keep everybody and figure out a way for Gonzalez to play a handful of games at several positions. He’s being paid like a starting player and would be a staple in the lineup that way. And whenever a regular gets a day off, the Twins can look to a player who had a 2.5 WAR last season and 4.3 in 2017 — better than your average bench player. The Twins will have strengthened their weakest link.

And the Twins could be purchasing insurance against Sano and Byron Buxton in what is a critical season for the former blue-chip prospects. If Sano sputters again, Gonzalez is capable of playing third base daily. If Buxton doesn’t bounce back, Max Kepler could become the new center fielder with Gonzalez sliding into right as the placeholder for the next outfield prospect, Alex Kirilloff.

Spending money

The deal is the result of the Twins keeping an eye on the market and looking for ways to fortify their 25-man roster at the right price.

The Twins’ payroll is around $106 million. If Gonzalez is making $10.5 million a year, that raises the payroll to around $116.5 million. According to spotrac.com, the Twins will have spent $48.6 million on free agents — including Gonzalez, designated hitter Nelson Cruz, second baseman Jonathan Schoop, pitcher Martin Perez and reliever Blake Parker — this offseason; the number is ninth-most in baseball and first among American League Central teams. Defending Central champion Cleveland reshaped its roster because of falling attendance and spent just $2.5 million on free agents.

Will outspending the Indians in free agency allow the Twins to close the gap in the AL Central?

In a spring training already with plenty of tentacles to it — the futures of Sano and Buxton, the search for a closer, Rocco Baldelli’s first season as a manager — the Twins’ addition of Gonzalez adds a few more.