SEATTLE -- The Seattle Seahawks are headed back to the playoffs.

An outcome that few predicted after a massive reshuffling of their roster this offseason became a certainty Sunday with the Seahawks' 38-31 victory over the Kansas City Chiefs at CenturyLink Field. That clinched a wild-card berth for Seattle, which is sitting in the NFC's fifth spot and can lock that up with a win over the Arizona Cardinals in next Sunday's regular-season finale.

The Chiefs (11-4) would have clinched the AFC West and the conference's No. 1 seed by beating Seattle. But the Seahawks (9-6) pulled off an upset behind three touchdowns from Russell Wilson, two on the ground from Chris Carson and a strong first half from their rebuilt defense.

It will be the Seahawks' seventh playoff appearance in Pete Carroll's nine seasons in Seattle. According to ESPN Stats & Information research, only the New England Patriots have more in that span with nine. The Seahawks had made the playoffs only 10 times in the 34 seasons before Carroll and general manager John Schneider arrived in 2010.

And it capped another comeback from an 0-2 start. Since the NFL expanded its playoff format to 12 participants in 1990, only 28 teams through 2017 reached the postseason after starting 0-2. One of those teams was the 2015 Seahawks.

"There's an emotion to it that's deep and it's because there wasn't very many people that thought we could do this," Carroll said, sharing a sentiment that was repeated in some form by several players in the locker room. "Most everybody thought we didn't have a chance."

The victory that put the 2017 Seahawks back in the playoffs was arguably their most impressive of the season. The Chiefs, who still own the AFC's best record, opened as 2.5-point road favorites and came to Seattle averaging a league-best 35.6 points per game.

Seattle's defense, with one starter in free safety Tedric Thompson missing and several more banged up, held MVP front-runner Patrick Mahomes & Co. in check through two quarters. The Seahawks took a 14-10 halftime lead with the help of two takeaways, both coming via forced fumbles that Seattle recovered. The first set up Wilson's go-ahead touchdown throw to tight end Nick Vannett and the second thwarted a Chiefs scoring opportunity at the end of the second quarter.

Carson gave the Seahawks a 7-0 lead on their first possession with a 4-yard touchdown run. He finished with 116 yards on 27 carries to become Seattle's first 1,000-yard rusher since Marshawn Lynch in 2014. It capped his comeback from the leg injury that ended his promising rookie season after four games last year.

"If you remember, I told you guys he was the most well-conditioned guy that showed up when we returned in April," Carroll said of Carson. "There was nobody that was more fit, nobody was more ready for the work. I don't know how he did it, but he's just unbelievable and that commitment that he has, it carried through the whole season."

The deterioration of the Seahawks' post-Lynch running game was among the leading reasons why they finished 9-7 last season and missed out on the playoffs for the first time since 2011. They had finished between first and fourth in rushing from 2012 to 2015, then dropped to 25th and 23rd the past two seasons.

The Seahawks, back atop the league in the category this season, produced 210 yards on the ground (including two kneel-downs for minus-2 yards) and an average of 4.9 yards Sunday night. They were without right tackle Germain Ifedi because of a groin injury and lost left guard J.R. Sweezy to what Carroll called a sprained ankle in the first half. That forced D.J. Fluker and his not completely healed hamstring into the game, which moved Ethan Pocic from right guard to left guard.

"It's a lot going on," left tackle Duane Brown said. "We still managed to get 212 yards rushing against a pretty good defense. That just says a lot about us, man. It says a lot about our backs."

The Chiefs tied the game at 17 in the third quarter when Mahomes delivered a sidearm throw while running to his right for a 25-yard touchdown to Charcandrick West. They cut Seattle's lead to 31-28 late in the fourth quarter when Mahomes hit Demarcus Robinson for his third TD, then ran in a two-point try.

That's when the Seahawks answered with a playoff-worthy drive. Tyler Lockett hauled in an over-the-shoulder catch on a floating pass from Wilson for 45 yards. After taking a sack for a 9-yard loss, Wilson lofted a deep ball that Doug Baldwin hauled in with one hand for 29 yards. Carson punched it in from a yard out to make it 38-28 Seahawks.

Kansas City drove for a field goal then tried an unsuccessful onside kick that went out of bounds.

Wilson finished 18-of-29 passing for 271 yards and a 127.2 rating. His other touchdowns were to Baldwin and tight end Ed Dickson. Baldwin finished with seven catches for 126 yards on 12 targets, all season highs. He said again that this season has been "hell" for him because of all the injuries he has dealt with, but it's been trending in the right direction with all five of his touchdowns coming over his past five games.

"I've never seen Doug play better than that," Carroll said. "I just thought he was magnificent."

Wilson's three touchdowns gives him 34 on the season, tying the career high he set in 2015 and matched in 2017. He now has 195 for his career, tied with Dave Krieg for the most in franchise history.

Seattle's first takeaway came on a fumble that defensive end Dion Jordan forced and defensive tackle Jarran Reed recovered. Cornerback Justin Coleman and strong safety Delano Hill teamed up for the second forced fumble and recovery.

The Seahawks now have the NFL's best turnover differential at plus-14.

"We have all the tools, man," said linebacker K.J. Wright, who played for the first time since Week 10 because of a knee injury that also kept him out of the first six games. "We have all the tools. Great running game, Russell's still leading the way, Doug is shining and this defense is outstanding, creating turnovers. That's what it takes. That's the winning formula. Run the ball and play good defense."

Wright called it "a smack in the face" to have seen preseason projections that had the Seahawks winning only four or five games. Some were that pessimistic about Seattle's chances because of the absences or departures of a handful of the greatest players in franchise history.

Seattle lost Kam Chancellor to a career-ending neck injury last November, released Richard Sherman over the offseason, and then lost Earl Thomas to a broken leg in September. Those three plus Michael Bennett (released), Cliff Avril (injured) and Sheldon Richardson (free agency) added up to six Pro Bowlers gone from Seattle's defense.

The Seahawks also let offensive starters Jimmy Graham and Paul Richardson, among others, sign elsewhere without making any splash additions of their own in free agency.

Yet here they are, back in the playoffs.

"Not too many people saw us coming to this, being in the playoffs, but the guys in this group believed we could make it, the leaders led the way, and the young guys followed," Wright said. "So I'm really proud of this team. This feels really good, to make it to the playoffs.

"And we're just getting started. We've got a lot to do. It's just the beginning."