The deal will begin after next season. Bryant is making $23 million this season and is due to earn $24.8 million next season.
"It's very rare to have a player play his entire career in one city, so I'm very excited," he said after the Lakers beat Utah 106-92.
Bryant could earn $27.4 million in 2011-12, $30.2 million the following season and more than $32 million in his final year, when he would be 35.
Asked if it would be his last contract, Bryant replied, "I doubt it, but it's possible."
The deal means the Lakers achieved two main objectives going into the season
- signing Bryant and 7-foot center Pau Gasol to extensions.
"We were able to accomplish those goals, helping to keep the core of this team intact for the foreseeable future and in turn help to ensure the franchise's continued success over the years to come," general manager Mitch Kupchak said.
Gasol signed his own three-year extension in December that extends through the 2013-14 season. He is making $16.5 million this season and $17.8 million next year. His new deal likely will pay him around $20 million per season.
"It's a great thing," Gasol said about Bryant's deal. "I really had no doubt he was going to get it done. It makes all of us happy."
Kupchak said Gasol's signing was a factor in Bryant staying on.
"It's a great compliment that I had an influence on Kobe wanting to re-sign," the Spaniard said.
The 31-year Bryant could have terminated the last two years of his contract and become an unrestricted free agent last July. He also had the option to become a free agent this summer.
He said he had no thoughts about going elsewhere even while speculation had suggested otherwise.
"I knew I was going to be here," he said.