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."
Bryant has spent his entire 14-year career in a Lakers uniform. The extension coincides with the length of the deals signed by teammates Pau Gasol and Ron Artest. Lamar Odom and Andrew Bynum's contracts run through the 2012-2013 season, keeping the core of the team intact for at least the next three years.
"We are extremely pleased that we were able to reach an agreement and come to terms on the extension at this time," Lakers general manger Mitch Kupchak said before Friday's game against Utah. "Kobe has been a cornerstone of the Lakers for well over a decade, helping to lead us to four NBA championships and in the process developing into one of the greatest players in basketball history."
"I knew I was going to be here," Bryant said.
Kupchak was also confident a deal was going to get done before the end of the season.
"It's something that could have been done much earlier," Kupchak said. "Quite frankly the only thing that we decided was important when discussing the extension during the negotiation was we didn't want it going into the playoffs. So there really wasn't really a time frame on either side."
Kupchak said he wouldn't negotiate a contract with a player during the postseason and if the Lakers advanced to the NBA Finals, he would have only had a week or two to get a deal done with Bryant before the July 1 deadline for him to opt out.
"Then you're entering an area where there's some real deadlines and you don't want to do that unless you have to," he said.
"My position all along is Kobe started as a Laker and should end his career as a Laker so in my mind I always thought he'd end up as a Lakers and we're fairly assured he will end his career as a Laker," Kupchak said. "Of course, in four years he'll be 35 years old and maybe we'll go through this again but I think at that point after all the years if he did chose to play some more he would chose to play in Los Angeles."
Bryant, who is averaging 27.2 points, 5.3 rebounds and 5.1 assists this season and has helped the Lakers win four NBA titles, may have gotten a deal done earlier but wanted to wait until the team first signed Gasol. He signed a three year contract extension with the Lakers Dec. 24.
"There was a period when we were talking to Kobe and it looked like we could get Pau done so I spoke to [Bryant's agent] Rob Pelinka and asked if we could take a break and try to get this done and that took a month, a month and a half and they said no problem," Kupchak said. "That's maybe why it took longer than it could have but neither side felt there was a timeline where it had to get done there was always a certainty that it would get done."
While Bryant wanted to make sure he would be surrounded by Gasol, Bynum, Odom and Artest for the foreseeable future, he never brought up Phil Jackson's name during contract negotiations. The 64-year-old coach's contract is up at the end of the season and he has yet to decide if he will return.
"It was not a factor in the negotiation with Kobe," Kupchak said. "It never came up."
Jackson said even if he came back, Bryant and the core group would have to get used to playing under a new coach at some point.
"I'm not going to buy into anything for three or four years," Jackson said. "I don't think that's in the cards at all. But I can look at a season, one year at a time right now and feel comfortable with the commitment I can generate to get through another year and push the team hard enough to get them through a year. When you talk about those long-term things, there's got to be a change here in the near future where there needs to be a successive coach who is able to deal with these players help them on with their game."
Kupchak wasn't sure if Bryant's contract extension would influence Jackson's possible return but reiterated the team wanted him to return as the coach.
"I don't think the organization's position with Phil has changed," Kupchak said. "At the end of the season we'll go to Phil and say, 'What's your timeline?' And he already indicated his timeline will include a physical checkup. And at that point in time he will indicate if this is something he'd like to continue to do and we'll sit down and talk. I personally sat down with Phil and indicated I'd love to have him back as the coach. He obviously does a wonderful job but it falls under his timeline."
Bryant, a 12-time All-Star who was voted league MVP in 2008, never talked about his contract situation with his teammates, but Gasol said no one in the locker room was surprised with the news of the extension.
"I thought it was only a matter of time and that it would get done sooner or later," Gasol said. "The core of the team will stay together for a while and that was the goal of the franchise and I'm immensely happy for each and every one of the guys including myself. It's a great that Kobe got that extension signed. We're all very happy for him."
ESPNLosAngeles.com reporter Arash Markazi and The Associated Press contributed to this report.