The deal keeps one of baseball's most dynamic players with the reigning World Series champions long term. The All-Star second baseman had two years remaining on his deal before the agreement.
It's the most money the Astros have committed to a player in franchise history. The previous most was a six-year, $100 million deal for Carlos Lee following the 2006 season.
Altuve is the sixth player in major league history -- and second position player -- to get a contract averaging $30 million annually. The others are Zack Greinke ($34.4 million), David Price ($31M), Miguel Cabrera ($31M), Clayton Kershaw ($30.7M) and Max Scherzer ($30M).
Earlier this year, Altuve said his desire was to remain with the only organization for which he has played.
"I want to stay here," he said in February, according to the Houston Chronicle. "If we talk about the city in Houston, I love the city. If we talk about the fans, I love the fans."
The 5-foot-6 Altuve has been one of baseball's biggest stars in recent seasons. He was the American League MVP in 2017, after batting a major league-best .346. He had 204 hits, 24 home runs and 81 RBIs.
The 27-year-old has been a relative bargain for Houston. He signed a four-year, $12.5 million extension in 2013 and was set to earn $6 million this season and had a team option for $6.5 million next year.
The new agreement reportedly will run through Altuve's age-34 season.
In February, he said a new contract wasn't on his mind but did wonder what would happen if he continued his success.
"I have played four years on my current contract, and obviously I've had some success," Altuve said then, per the Chronicle. "I'm not thinking about it. I don't think -- I don't know [about] next year. It's hard to not think about your last year when you are in your last year. But, right now, I'm good.
"It's going to be interesting if I go there and put up another great season with one year left. It's going to be like, 'OK. Now what? Now what?' But I think in the end, somebody has to make a decision. It's either keep me here or let me go. I don't know what it's going to be."
A five-time All-Star, Altuve signed with the Astros in 2007 as an amateur free agent. He has been with the big league team since 2011 and has won three batting titles.
He has led the AL outright in hits for four straight seasons, the first player in MLB history to do that. He also has 84 home runs in his career, the second-most ever by a player 5-foot-6 or shorter.
The deal was first reported by FanRag Sports.
Information from ESPN Stats & Information was used in this report.