Eager to remove his family from the unstable situation in Venezuela, left-hander Martin Perez agreed Thursday to a contract extension with favorable terms for the Rangers.

Perez is guaranteed $12.5 million over four seasons. If the Rangers exercise all three option years, Perez would earn $32.55 million over seven seasons. His top salary would be $9 million, in 2020. Perez would also never go to salary arbitration and would push back his free agency by two years.

Perez acknowledged that concerns about the economic and political uncertainties in his native country prompted him to have his agent, Felix Olivo, approach the Rangers about the deal. Perez plans on applying the $1 million signing bonus to relocating his family to the United States.

“Everybody knows Venezuela is not good now,” Perez said. “My future is here. I’m going to work hard and learn something every day and be a better pitcher and a better person.”

Perez has made only 26 major league starts. The Rangers made a long-term investment in him because of his continuing maturation, which showed on the mound this season. Perez, who opened the season on the disabled list because of a fractured left forearm, went 10-6 with a 3.62 ERA in 20 starts.

General manager Jon Daniels had one last telephone conversation with Perez before signing off on the contract. Perez, unprompted, said what Daniels wanted to hear: Money will not change him.

“From a management standpoint, that’s all you can ask,” Daniels said. “This is part of our long-term plan. Identify the best talent and make-up guys, the best workers that we have, and make sure we keep that core together as long as possible.”

The Rangers have four starting pitchers signed through 2017: right-hander Yu Darvish and left-handers Matt Harrison, Derek Holland and Perez. Right-hander Alexi Ogando, the tentative No. 5 starter for next season, is expected to work on a one-year deal.