"I love what we've been doing," Warner said. "I love what we've been building here."
Under the terms of the deal, Warner will receive a $15 million signing bonus and $4 million base in each of the two seasons.
"We're ecstatic about the commitment the organization has made to us," Warner said. "Now it's my job for the next two years to go fulfill my part of the deal."
He believes it's his final NFL contract.
"You never say never," Warner said, "but I'm old."
He had talked about needing time after the season to decide whether to retire, a thought that turned out to be fleeting.
"Probably two days after the Pro Bowl all that was on my mind was football," Warner said. "I told my wife, 'Sorry honey, it's not time."
He said he understands that he's getting a lot of money in a time of financial hardship for so many.
"You know the numbers are staggering, and to add to that the economy and where people are struggling, it's tough," Warner said. "But all I know is I've worked hard to get to the point that I'm at, to be in this position and have opportunities like this and I don't regret that fact.
The negotiations ran all Tuesday evening and early Wednesday morning. One of the big breakthroughs came Tuesday when Warner, who had been asking for $14 million to $16 million a year, reduced his asking price to $11.5 million a year, as long as there were substantial guarantees in 2010.
He was also willing to take $1 million less a season if the team successfully satisfied the contract extension demands of wide receiver Anquan Boldin.
That provision wasn't in the contract.
The Cardinals didn't initially like the structure of Warner's reduced contract because it paid Warner $13 million in 2009 and $10 million in 2010, of which $6 million was guaranteed. They felt that it meant Warner would be guaranteed $19 million of his $23 million, figuring he wouldn't be cut in 2009 after helping to take the team to the Super Bowl. In the end, they agreed to guarantee all but $4 million of the contract and assure Warner will be the Cardinals' starting quarterback the next two seasons.
"We wanted to come up with a number that was fair to Kurt, and to be able to do that within the context of other team objectives," Cardinals general manager Rod Graves said.
On Monday, Warner flew by private plane to San Francisco to visit the 49ers, who outlined the parameters of a contract that would have been for more money and more guarantees than the Cardinals were willing to offer.
"I told my wife probably 45 minutes into it that I just felt God say 'You're supposed to be in Arizona,'" Warner said, "and I told her that. She tried to tell me to stay open, but He just continued to confirm it."
Though the 49ers' offer was not firm, Warner knew he could come close to his idea of being paid like a top-five quarterback, which, in his view, is the $14 million to $16 million range.
Warner has been performing like a top-five quarterback since taking over the Cardinals' starting job from Matt Leinart on Oct. 14, 2007. He has thrown 53 touchdown passes in his last 27 games as the Cardinals' starter. Last season, he completed 67.1 percent of his passes and threw for 4,583 yards. In four playoff games, he completed 92 of 135 passes for 1,147 yards with 11 touchdowns and three interceptions.
Boldin has asked to be traded because he feels the Cardinals failed to follow through on a promise for a new contract a year ago.
Graves said the team still plans to eventually address Boldin's desire for a long-term contract.
John Clayton is a senior NFL writer for ESPN.com. Information from The Associated Press was used in this report.