Stephen Strasburg will remain with the Nationals rather than enter free agency. (Katherine Frey/The Washington Post)

Stephen Strasburg has signed a seven-year, $175 million contract extension with the Washington Nationals, people familiar with the situation said on Monday evening. An official announcement is expected Tuesday.

Strasburg said he did not want to comment on any deal after the Nationals’ 5-4 win over the Detroit Tigers, which is standard practice. The Nationals generally do not advise players, managers, or anyone else to comment on deals until they are officially announced.

“Yeah we just … I  don’t really have a comment on that right now,” Strasburg said. “I’m just really excited about this game.”

The deal includes a rolling opt-out after three or four years and performance bonuses for hitting 180 innings pitched each season, and it will likely include a significant amount of deferred money, according to a person familiar with the situation. At the very least though, the homegrown ace who has anchored the top of the Nationals rotation as they transformed into an annual playoff contender will remain in a Nationals uniform through the 2019 season.

Nationals Manager Dusty Baker, like many of his players after the game, said he had not heard anything about the deal.

“But if that’s the case, then I’m very, very happy,” Baker said. “I’d like to be here a little while longer with him.”

Without an extension, Strasburg would have become a free agent after this season — and been the prize of the free agent starting pitching market when he did. That he will not reach free agency, and instead will re-sign with the Nationals, constitutes a surprise.

Strasburg is represented by Scott Boras, known for advising his clients to take advantage of their right to free agency. Boras’s clients generally do not sign extensions. Strasburg will be the first pitcher represented by Boras to do so since Jered Weaver signed a long-term deal with the Los Angeles Angels in 2011. The last position player represented by Boras to sign a significant extension was Texas Rangers shortstop Elvis Andrus in 2013. Boras also represents Nationals right fielder Bryce Harper, who will be a free agent after the 2018 season and whose long-term status with the club has already been a focus of much speculation.

Asked about what a reported extension for a fellow Boras client and Nationals No. 1 overall pick might mean for him, Harper would not bite.

“Being able to just stick around and have some fun and play the game this year, and that’s what Stras is going to do,” Harper said. “It’s going to be fun.”

The Nationals do not generally complete major deals during the season. First baseman Ryan Zimmerman agreed to his six-year extension in spring training in 2012. The Nationals have not locked up their homegrown stars since. The Nationals offered what they considered market-value deals to Jordan Zimmermann, to whom the Nationals offered a tribute on the video board Monday night as he returned to Nationals Park with the Tigers, and Ian Desmond, but negotiations with both gained no ground during the 2015 season and their departures became a foregone conclusion.

By signing an extension, Strasburg diminishes the impact injury could have on his earnings in his prime. Strasburg underwent Tommy John surgery on his elbow in 2010 and battled a variety of issues last season when a sprained ankle dislodged his mechanics. Now, if by some chance he is injured this season, it will not affect his free agent earnings.

Interestingly, the Nationals are leery of the long-term life of arms that underwent Tommy John surgeries, and believe such procedures have a definite shelf-life, at the end of which time a pitcher becomes at risk for more elbow trouble. But they are also as willing as any team in baseball to draft young pitchers with Tommy John trouble. They used their first-round picks in the 2013 and 2014 drafts on young pitchers they knew would need the surgery — Lucas Giolito and Erick Fedde.

The Nationals drafted Strasburg first overall in the 2009 draft, and he has been a staple at the top of their rotation since he reached the major leagues — the 2010 and 2011 Tommy John-affected seasons aside. He was drafted out of San Diego State, the no-doubt top pick, considered a once-in-a-generation pitching talent, whose first minor league start drew reporters to Florida just to see him debut.

He was expected to be the kind of ace that could lift the Nationals, a 59-win team in 2009, to the top of the National League. Strasburg’s first fully healthy season, 2012, coincided with the first playoff appearance in Nationals history. Since then, he has the eighth-most strikeouts in all of MLB and the fourth-highest ratio of strikeouts per nine innings (10.30). Fellow Nationals starter Max Scherzer ranks third in the latter category. Now Strasburg and Scherzer, who signed a seven-year deal before the 2015 season, will pair atop the Nationals rotation through at least 2019. Strasburg became the Nationals’ all-time strikeout leader in April, at which time he joked that he did not know how long that record might stand. Given Monday night’s news, it may just stand for quite some time.

Barry Svrluga, James Wagner and Adam Kilgore contributed to this report.