SACRAMENTO, Calif. (AP) - Within months of becoming San Francisco mayor in 2004, Gavin Newsom decided his hometown would ignore the law and issue marriage licenses to same-sex couples.
The move rocketed the then-36-year-old Democrat to national fame and instantly made him a polarizing figure in a fraught debate that gripped and divided the nation.
Now he's poised to once again take a position of national prominence, this time as the leader of California's resistance to President Donald Trump.
Newsom, 51, was elected California governor on Tuesday, easily defeating Republican John Cox. It's a prize he's eyed for a decade and gives him a platform to spar with Trump and advance the ambitious policies he champions, including universal health care and an aggressive effort to improve services for impoverished children.
"We say about California: We're America's coming attraction," Newsom said while campaigning last week. "The future happens here first."
Weeks earlier, riding in the back of his campaign bus through the Central Valley, Newsom went over his life story and pushed back on the persistent narrative that's dogged him since his political career started -- that he had a privileged upbringing and rode the coattails of his father's wealthy and connected friends.
He doesn't deny his father's friends are wealthy and connected. Bill Newsom was close to Gordon Getty, who inherited a multi-billion-dollar oil fortune and invested in Newsom's first business, and has been lifelong friends with Gov. Jerry Brown, who also was governor during Newsom's youth.
But Newsom insists that narrative ignores his struggles as a child with dyslexia raised by a mother who held multiple jobs and moved all the time, and a father who, despite his connections, faced constant financial pressures. His parents separated when Newsom was young.
"I grew up very differently," he said. "Everybody thinks I was born at 18 or 20."
He was privileged to know the Gettys, he said, and to get experiences he'd never otherwise have, like foreign vacations they paid for as a teenager. But it wasn't his whole reality.
"Going on vacation once a year was not my life 360 of the other days," he said. "My life was working. Mom crying at night because she's struggling and stressed out."
With help from Getty and other investors, Newsom was in his 20s when he opened his first business, a San Francisco wine store called PlumpJack. The PlumpJack portfolio would grow to include boutique hotels, wineries, bars and restaurants mostly in Northern California, and Newsome would become a millionaire.
He has largely stepped away from the business and turned over management to his younger sister, Hilary. As governor, he said he'll forego all decision-making but won't sell his interests.
"These are my babies, my life, my family. I can't do that. I can't sell them," Newsom said.
That decision poses potential ethical concerns for the new governor. Hospitality businesses are heavily regulated by the state and could provide opportunities for interest groups to try to curry favor by, for example, renting facilities at Newsom's properties for events.
While campaigning, Newsom said after the election he would outline how he will guard against any ethical issues related to his business holdings.
Newsom got his start in politics with the help of California Democratic power broker Willie Brown, then San Francisco's mayor. He appointed Newsom to the city's Parking and Traffic Commission and later, at the urging of longtime local Democratic lawmaker and operative John Burton, to a vacancy on the San Francisco Board of Supervisors. Burton and Newsom's father were childhood friends.
"I thought that he'd serve the city quite well," Burton said. "And life's proven I'm a prophet."
Newsom was San Francisco's youngest mayor in a century when just three months into his term he jumped into the gay marriage debate.
He was credited with advancing the civil rights of gays and lesbians more than a decade before the U.S. Supreme Court legalized same-sex nationwide in 2015.
But he also was faulted by many Democrats for foisting the issue into the 2004 presidential campaign, long before same-sex unions were widely accepted outside liberal coastal enclaves. Republican George W. Bush was re-elected president that November.
Thousands of couples were married in San Francisco before the state Supreme Court shut it down.
Newsom made his decision as mayor a central pitch to voters -- proof that he has the courage to do the right thing. As mayor, he also was known for his homelessness and health care initiatives. And for scandal in his personal life.
The "Care Not Cash" program reduced cash assistance for people living on the streets and replaced it with housing and services. "Healthy San Francisco" provides basic health care to everyone in the city, even those living in the country illegally, funded largely by businesses and the city's general fund.
But he had a sometimes rocky relationship with the San Francisco Board of Supervisors. His ambitious pledge to end homelessness never came to fruition and that problem now is more pronounced than ever.
After his glamorous marriage to prosecutor-turned-Court TV personality Kimberly Guilfoyle ended in divorce, it came to light he'd had an affair with an aide who, at the time, was married to Newsom's campaign manager and close friend. Newsom said he learned from the episode and accepted responsibility for his actions.
During the gubernatorial primary, several of Newsom's opponents briefly seized on it as a campaign issue. At a debate, Republican Travis Allen said: "If you can't trust Gavin with his best friend's wife, why would you trust him with your state?"
Newsome responded that he was honest about the affair, "I was open about it. I apologized for it."
Guilfoyle went on to work for Fox News and now is dating Donald Trump Jr., the president's son. Newsom married Jennifer Siebel, an actress and filmmaker whose work has focused, among other things, on gender stereotypes. They have four children.
Newsom focused his campaign on opposition to Trump. He also opposed a state ballot issue to rescind a gas tax increase earmarked to improve infrastructure. Cox made the repeal a focus of his campaign.
Newsom also pledged to build 3.5 million housing units by 2025 to provide more options for poor and middle-class families, a promise many experts find overly ambitious, and to extend health coverage to the uninsured, including immigrants living in the country illegally.
On the campaign trail, Newsom memorized his speeches and all the facts and figures that went in them, a necessity because of dyslexia, a disorder that makes it difficult to read and comprehend written words.
"I just have to quadruple prepare, which is just not easy," Newsom said, then added: "But look, I'm only here because I do all this."
During his bus tour, he demonstrated the laborious coping mechanism he's developed to retain what he reads. He underlines important information, then goes back and rewrites key points in his own hand. He dates the page and stores them in binders separated by subject matter.
"You will never find my fifth-grade teacher (to) say, `I always knew he was going to be governor,"' he joked. "There's no teacher in my life -- they're all just sitting here going, `How the hell did that happen?"'
For most of Newsom's political career, he's been followed by questions about what many believe is his ultimate goal: president. On the campaign trail, Newsom said he's not considering that possibility, though he acknowledged few believe him, not even his friends.
They've seen him as presidential timber since he was a high school student wearing a suit and tie to school.
"I have no interest in anything to do with any of that," Newsom said of a run for president. "I mean, I don't know how else to say it. It's just anathema to anything I'm interested in in life."