If they lost on Sunday, it would all be over for the Cardinals. That’s what most of NFL world thought was going to happen, too.

Everyone expected the Cardinals to lose on their trip to CenturyLink Field. The Seahawks, after all, had the best record in the NFL, had won 14 straight at home and were chilling the champagne ready to celebrate winning the No. 1 seed in the NFC and with it, home-field advantage throughout the playoffs.

“Everybody was against us,” Cardinals nose tackle Dan Williams said. “You watch TV and we had no chance. Everybody kept talking about the 58-0 loss last year. But we’re a different team with a different mind-set. We’ve been playing for each other these last eight, nine, 10 weeks. We definitely knew we had a chance to come in here and get a victory.”

Despite the odds, despite the critics and despite four interceptions by Carson Palmer, the Cardinals wound up stunning the Seahawks 17-10 to keep their playoff hopes alive.

Michael Floyd hauled in a 31-yard touchdown pass from Palmer with 2:13 left to play and Karlos Dansby sealed the win on the next play from scrimmage when he intercepted a Russell Wilson pass intended for Doug Baldwin.

The Cardinals (10-5) have now won seven of their past eight and handed the Seahawks (12-3) their first loss at home since Dec. 24, 2011.

“It doesn’t get any better than that,” said Cardinals coach Bruce Arians, who greatly improved his chances on winning a second straight Coach of the Year award. “…That’s a great football team that we just played. Whether we make the playoffs or not, we beat one of the best.”

To make the postseason, one of the two following scenarios have to play out for the Cardinals:

They need the Falcons to beat the 49ers tonight and then the Cardinals must beat San Francisco next Sunday at University of Phoenix Stadium.

Or, they need the Buccaneers to beat the Saints next Sunday in New Orleans and the Cardinals still must beat the visiting 49ers in the regular-season finale.

“I don’t know what the scenarios are, but nothing matters,” said Palmer, who was 13 of 25 for 178 yards, including a passer rating of just 48.8 because of the picks. “We had to come in and get the win and now we get a chance to play at our place next week and we’ve got to win and figure out what’s next from there.”

The Seahawks can still wrap up the NFC’s No. 1 seed if they beat the Rams here next week and although they looked a little stunned, Seattle players were already busy looking ahead.

“It’s a championship week next week, it doesn’t get any better,” said quarterback Russell Wilson, who was just 11 of 27 for 108 yards with one touchdown and an interception. “That’s what we’re looking forward to. Obviously you want to win this game and it would have meant a lot. But it still means the same thing next week. That’s the good thing about it.”

From the Cardinals’ perspective, Sunday’s game looked good because it could have easily been a whole lot worse. Palmer was intercepted three times in the first half, and yet the Seahawks converted the three turnovers into just one field goal.

That came early in the second quarter when Steven Hauschka converted a 27-yarder following a nice, sustained drive. The Cardinals countered with one of their own, marching 75 yards on 16 plays in a drive that lasted eight minutes, 21 seconds. But like the Seahawks, they couldn’t get into the end zone, either, and settled for a 39-yard field goal from Jay Feely, who would add ones from 46 and 26 in the second half.

Hauschka missed a chip shot from 24 yards when his kick bounced off the left upright just before halftime. He missed an extra point, too, after Wilson found Zach Miller in the end zone for an 11-yard score that tied the game at 9 with 7:26 remaining.

Officials ruled the Cardinals’ defense lined up in an illegal formation, however, so Hauschka was allowed another try and this time the extra point was good.