The Washington Redskins, unable to strike a long-term contract with Kirk Cousins, have solved their uncertainty at quarterback by trading for Kansas City's Alex Smith, a 13-year veteran who was the NFL's top-rated passer last season.

The move will bring the 33-year-old Smith to the third NFL team of his career and is expected to be finalized Wednesday, according to multiple people with knowledge of the deal.

Smith, who had one year remaining on his contract with Kansas City, will sign a four-year contract extension that will tie him to Washington for the next five years, according to a person familiar with the deliberations. The four-year extension is worth $94 million and includes $71 million in guaranteed money.

The Redskins, in turn, are sending Kansas City a third-round draft pick and one of their rising defensive stars, cornerback Kendall Fuller, according to a person with knowledge of the deal.

The deal means Cousins, 29, who had shown no interest in striking a long-term deal with the Redskins, will get what he has long sought: A chance to test his value on the NFL's free agent market and have a choice in his employer for the first time in his career.

Meanwhile, the Redskins get a proven quarterback who is coming off the best season of his career. Better still, they get stability at their most important position, which no doubt will please Coach Jay Gruden, who earlier this month made clear he had grown weary of not knowing from one year to the next whether Cousins was returning. With Redskins President Bruce Allen unable to strike a long-term deal with Cousins, and Cousins showing little reciprocal interest, the team resorted to the NFL's high-priced franchise tag to bar his departure after the 2015 and 2016 seasons.

The trade for Smith represents a sorely needed victory for Redskins owner Daniel Snyder and Allen, who in the view of several NFL executives had mishandled contract talks with Cousins and faced the financially untenable prospect of paying him $34.5 million — on top of the roughly $44 million they had paid Cousins under back-to-back franchise tags — to keep him under wraps for a third one-year deal. The slightly less burdensome option of the NFL's transition tag (roughly $28 million) carried the additional risk that a rival team would offer the quarterback a long-term deal that the Redskins would be forced to match in order to keep him.

The trade, first reported by The Kansas City Star, means that Cousins has played his last game in Washington. And it drew high marks from former Redskins general manager Charley Casserly, now an analyst with NFL Network.

"This is a smart move because the Redskins head into free agency with the quarterback position set," Casserly wrote in an email exchange Tuesday night. "This is what they needed to do whether they signed Cousins or traded for Alex Smith. Smith and Cousins have similar ability to play quarterback."

The 6-foot-4, 217-pound Smith threw for 4,042 yards last season, leading the Chiefs to a 10-6 record and AFC West title while throwing a career-high 26 touchdowns to five interceptions. He finished the season with a career-high 104.7 quarterback ratings and was named to his third Pro Bowl.

But his arrival hardly means the 2018 Redskins will become an NFC East contender overnight. The squad has myriad needs following a disappointing, 7-9 season as it heads into free agency in March and the NFL draft in April. The defense stumbled down the stretch after losing key contributors on the defensive line to injury, including rookie Jonathan Allen. Injuries at inside linebacker and defensive back further thinned their ranks. The ended the year ranked 27th in points allowed (24.2 per game) and now must replace Fuller, who led the cornerback corps with four interceptions.

For Cousins, 24.2 points was a lot of overcome week after week — particularly after losing 2,000 receiving yards with the offseason departure of wide receivers DeSean Jackson and Pierre Garcon. Injuries to favorite targets Chris Thompson and tight end Jordan Reed made matters worse.

While Cousins topped the 4,000-yard passing mark for a third consecutive season, he wasn't his best in some crucial moments and key games. The upshot did little to convince the Redskins' front office that he was worth the sort of money that franchise quarterbacks demand.

Gruden signaled as much during his post-season press conference after the team's second consecutive third-place finish in the NFC East. "Kirk had his flashes where he was really good," Gruden said. "From a consistent standpoint, over the course of 16 games, we're 7-9."

Cousins was never Snyder's first choice at quarterback. From the outset, he was drafted as an insurance policy, chosen by the Redskins in the fourth round of the 2012 NFL draft after the team had traded a fortune to acquire Heisman Trophy winner Robert Griffin III second overall.

Even after he supplanted Griffin as the team's starter in 2015, the notion of mutual trust between Cousins and the Redskins grew strained. Allen wasn't eager to sign him to a long-term deal after he led the team to the NFC East title in 2015. And after Cousins followed with a strong performance in 2016, it was Cousins who wasn't eager to tie his future to that of the Redskins. Now, he'll get the chance to test his value on the NFL's free-agent market in March.

Smith, a standout at Utah, had a rocky start to his NFL career. He was chosen by San Francisco with the first overall pick of the 2005 NFL draft with the enthusiastic backing of the 49ers' vice president of player personnel, Scot McCloughan, who served just over two years as the Redskins' general manager. But he struggled amid the tumult in the 49ers organization and was traded to Kansas City following the 2012 season. He immediately flourished under Coach Andy Reid, winning his first nine starts.

In Smith's five seasons as the Chiefs' starting quarterback, Kansas City has compiled a 53-27 record, reached the playoffs four times, won the AFC West twice and never finished worse than second in their division. In that span, Smith started all but four of 60 regular-season games.

Kimberley A. Martin contributed from Minneapolis.