Cardinals string together three-game winning streak in Seattle.

Otto Greule Jr Getty Images North America

SEATTLE (AP) -- Carson Palmer threw for 363 yards and three touchdowns, Andre Ellington had a 48-yard touchdown run with 1:58 remaining and the Arizona Cardinals moved three games ahead in the NFC West with a wild 39-32 victory over the Seattle Seahawks on Sunday night.

Palmer helped the Cardinals (7-2) build leads of 19-0 and 22-7 at halftime, only to watch Seattle (4-5) rally and take a 29-25 lead early in the fourth quarter on Bobby Wagner's 22-yard fumble return that left CenturyLink Field shaking.

More from FoxSports

Undaunted by losing the lead, Palmer led the Cardinals on an 83-yard touchdown drive, capped by a 14-yard strike to Jermaine Gresham with 8:41 remaining. The Cardinals held Seattle on its next possession and Ellington added the punctuation, sprinting down the sideline on a third-down run to cap Arizona's big night.