Mike Rizzo will lead the Nationals beyond this year. (Jonathan Newton/The Washington Post)

Nationals President of Baseball Operations Mike Rizzo, the architect of one of the winningest teams of this decade, will continue to lead the franchise beyond this season.

In a move that showed nearly unprecedented awareness of optics, and turned a spring of internal unrest into a newfound sense of stability, the Nationals signed Rizzo to a two-year extension Wednesday night, just in time to serve as a feel-good backdrop to Thursday’s home opener. The deal will pay him $4 million annually, according to a person familiar with the situation.

When those within the industry describe Rizzo, the negotiator, they praise his straightforward nature. He does not play games. He says what he thinks, and often what he thinks is not fit for print. But when it comes to negotiations, Rizzo sets his price and does not budge, stubborn in his stance, unwilling to concede when he has a number in mind.

But when it came to his own contract situation, Rizzo shed stubborn in favor of straightforward. He made his position clear. He wanted to stay in D.C., to see the thing he built from scratch become the thing he envisioned all along. He bought a house up the street from the stadium, which diminished his leverage significantly. But winning the negotiation was not his priority.

“My negotiating skills are much better when I’m negotiating for a trade or free agents than it was for myself. You don’t usually buy a house when you’re negotiating a contract,” Rizzo said. “… I came to a deal that I’m very happy with it and satisfied with.”

Rizzo’s résumé  includes four division titles, four 95-win seasons, the drafting of numerous all-stars and the orchestrating of numerous trades that look prescient in hindsight. Every player the Nationals have taken in the first round during his tenure has made the majors except for the two most recent ones, who have yet to develop to that point. Other than the lack of a World Series title, or even appearance, that resume compares favorably to the most-touted tier of front office gurus. Yankees’ General Manager Brian Cashman, Cubs’ President of Baseball Operations Theo Epstein, and Dodgers’ President of Baseball Operations Andrew Friedman all recently signed deals for at least five years with annual values of around $5 million.

“The years are important to me, but the AAV [average annual value] of the deal is right where I wanted it to be,” Rizzo said. “ and I think everything else takes care of itself in the long run. Like I’ve told the players, we win, we all eat better.”

Winning this year was never the concern when it came to Rizzo’s deal. But that deal expired Oct. 31. The World Series is scheduled to end a few days later. The most vaunted free agent class in major league history, which includes Bryce Harper, will be available for wooing shortly thereafter. This offseason promised to be complicated enough without a GM search to worry about.

“This is good for the organization that he’s going to be here, but we knew this had to get done,” Max Scherzer said. “Obviously we’re happy, but we’re going to … like …”

What Scherzer was trying to say as diplomatically as possible was that this shouldn’t have been a question in the first place. He said that publicly in spring training when he called on ownership to take care of Rizzo’s deal sooner than later. Few players had spoken out as strongly as Scherzer did then, but players had started coming to Rizzo — big-name Nationals players — expressing frustrations that the deal wasn’t done, and wondering if they should say something, too.

Rizzo had been talking to ownership for months, but making incremental progress toward a deal, at best. Over the last few days, while the team traveled through Cincinnati and Atlanta, the two sides started inching closer.

When it became clear they had a chance to get the deal done in time for the home opener, Rizzo decided he wanted to make that happen. The team landed at Dulles, took the customary bus ride back to their cars at Nationals Park, and Rizzo signed his deal into reality, just in time to announce it a few hours before pregame introductions.

“I was always focused on winning. I was focused on the next day,” Rizzo said. “I think this is more important to the employees that we have — the scouts, the front office, and the players — to know that I’m going to be around, there will be consistency, more so than me worrying about it.”

Rizzo’s deal means more to more people than just the players he signs and develops. He has built a staff not used to turnover, surrounded himself with special assistants whose jobs depend on his, constructed a minor league coaching staff that can now be certain of their boss.

One of his high-level assistants told the story of signing a two-year deal before this season, meaning his deal outlasted Rizzo. He didn’t want to sign the deal initially, but Rizzo told him to take the security, to take the money, and not to worry about him. That assistant listened, hoping Rizzo would stay, not wanting to work here without him. Now, he does not have to.

Manager Dave Martinez admitted he had concerns about Rizzo’s situation when he signed his three-year deal with a fourth-year option. Now, he and Rizzo are both under contract through 2020.

“If you know Mike and you know what he does, it’d be hard-pressed for anybody to let him go,” Martinez said. “He’s really good at what he does. I’ve learned a lot about how he develops players and how he’s picked players. He’s helped me a lot so far.”

The Nationals had very few questions marks entering their season. With a 4-2 start, they had little controversy to speak of, and few problem spots about which to worry. The only thing that loomed, the only cloud that seemed likely to grow, was Rizzo’s contract situation. That cloud dissipated Thursday morning, giving way to a bright and sunny home opener, and two more years of much-needed stability.

Read more about the Nationals

Nationals lose, 7-1, handing Braves the series and some of their swagger

Cord cutters still can’t watch Nats or Orioles games. They aren’t happy about it.

Nationals-Mets series preview: A clash of rivals opens with Stephen Strasburg on the hill

The Bullpen is back, Aslin and pizza arrive: A look at what’s new around Nats Park for 2018