The decision was made public late Tuesday morning after a vote by 32 National Football League team owners at a meeting in Boston Tuesday.
Dozens of people gathered in Santa Clara City Council chambers at City Hall to watch live coverage of the NFL's decision. When the news was announced, fans shouted with joy and waved red rally rags bearing the 49ers logo.
A jubilant Santa Clara Mayor Jamie Matthews said, "Before we built a stadium, we landed the 50th Super Bowl."
The NFL team owners chose the 49ers' $1.2 billion Levi's Stadium to serve as the site for Super Bowl L over a competing bid by the Miami Dolphins. The 49ers are planning to move from Candlestick Park to the new 68,500-seat stadium in Santa Clara in 2014.
Matthews said that when he heard the game would be played in his city, "a shot of electricity came through me."
He said it is estimated that a Super Bowl brings between $300 and $500 million in economic benefits to the surrounding region.
"I was not building a stadium, I was building an ATM machine," Matthews said of efforts to push the project forward.
Jed York, 49ers CEO, said at a noon news conference in Boston, "There's a lot of things that were going in our favor. I think it was the overwhelming support from the community that made the difference."
"I think it shows that the 49ers try to win with class on and off the field, and this is one of those examples off the field," York said.
Matthews, accompanied by his wife Julie at City Hall, said he was exhausted from the emotional "roller coaster" involved in the Super Bowl bid, and that he was heading home to take a nap.
He thanked San Francisco Mayor Ed Lee for his efforts in the process.
Lee learned the Super Bowl news when he was handed a note during a ceremony at City Hall this morning to honor the Golden State Warriors and point guard Stephen Curry for their NBA playoff run.
"I had to read it three times," he said.
The announcement drew raucous cheers from the crowd at City Hall.
Lee said, "A lot of people were betting on us because this is what we do. This is the kind of international event that we love hosting."
Curry said that after seeing the fan support for his team, he knows Bay Area residents will come out in droves for the Super Bowl.
"It's going to be amazing," he said. "The Bay Area loves their sports, so to be able to host the Super Bowl, it's going to be a thrill."
He added, "Hopefully we're not playing that night so we can go watch it."
Nathan Ballard, a spokesman for the Super Bowl bid committee, said organizers will now establish a host committee to do the day-to-day planning for the events leading up to the big game.
Ballard said the Super Bowl will be lucrative for Bay Area businesses.
"There are no small Super Bowls," he said. "Every Super Bowl, every year, brings millions and millions of dollars into the entire region. We're going to have hotel rooms filled, all the way from Pebble Beach to wine country."
The bid to the NFL owners included more than 22,000 hotel rooms that have been set aside for the event, along with a list of official and unofficial events that will be held throughout the region, including an "NFL Experience" interactive fan exhibit at Moscone Center in San Francisco.
The bid committee has raised $30 million in pledges from corporate partners such as Apple, Goodle and Hewlett Packard, and will contribute 25 percent of the funds raised for the bid to local charities that help low-income children and families.
It was also announced Tuesday morning that Houston will host the Super Bowl in 2017.