The party began as soon as the Golden State Warriors beat the Cleveland Cavaliers to claim the title in six games Tuesday night.
A rowdy crowd gathered in an Oakland intersection, and some people were running through the streets of San Francisco's Mission District waving the team's blue and gold flags. There were no immediate reports of any violence, vandalism or arrests.
"Is this real? Is this real?" said 40-year-old Peter Boyd, a fourth-generation Oakland resident who was practically a newborn when the team won its last title. On Tuesday night, he celebrated in the streets outside an Oakland sports bar.
"I sat through decades of awful garbage," Boyd told the Los Angeles Times. "This is for Oakland."
The game was more than 2,000 miles away in Cleveland, but it made little difference to local fans, thousands of whom had gathered at Oracle Arena in Oakland to watch the win on a big screen.
San Francisco Bay Area fans have been able to take to the streets to celebrate multiple Super Bowl and World Series winners, but for the first time in four decades, they can throw a party for basketball. The Warriors last won a title in 1975, before many of their loudest and rowdiest fans were born.
In San Francisco, the city hall building was lit blue and gold.
"The San Francisco Bay Area is awash in Blue and Gold as we congratulate our hometown heroes on their spectacular victory!" Mayor Ed Lee said.
Oakland announced a parade and rally for the Warriors at 10 a.m. Friday.
Police hoped to avoid a scene like the one that followed theSan Francisco Giants' World Series victory in October. That celebration started off peaceful but turned raucous and violent, as revelersvandalized police cars and businesses and pelted officers with bottles.
The Oakland Police Department tweeted out congratulations to the team and urged revelers to celebrate safely and responsibly.
The Associated Press contributed to this report.
Warriors win NBA championship
The Warriors close out the Cavs 105-97 in Game 6 to win their first NBA championship since 1975.