LOS ANGELES (AP) — Democratic Attorney General Kamala Harris snapped up a second term as California’s top attorney Tuesday after a lopsided race against a little-known Republican challenger.

COMPLETE COVERAGE: 2014 Election Results

Harris, a former San Francisco district attorney, defeated self-described political novice Ron Gold with 55 percent of the vote with more than 3.9 million votes counted.

“Thank you California! We have important work still ahead of us,” Harris said on Twitter, shortly before midnight. “I’m honored by tonight’s victory and I’m proud to begin the next 4 years.”

Gold is a Republican and former deputy attorney general who made his support of legalized recreational marijuana for Californians over 21 the centerpiece of his uphill campaign.

Harris spoke out against California’s failed Proposition 19 legalization measure when she first ran for the office in 2010.

Since then, she has softened her stance and now says California should wait and watch how Colorado handles issues arising from its vote to legalize recreational pot. She supports the use of medical marijuana.

Harris, 50, who served two terms as San Francisco district attorney, was the first black woman elected as district attorney in California when she won that seat in 2003. She is also the state’s first black, female attorney general.

In her first term, she focused on cross-border gangs that increasingly target businesses and financial institutions through high-tech crimes such as digital piracy and computer hacking. She also helped secure a settlement with major mortgage lenders and got extra money for California.

Harris is a personal friend of President Barack Obama and widely presumed to be a possible candidate for governor or U.S. Senate in the future, if she wins a second term as attorney general.

Gold, 69, is a private-practice attorney in Woodland Hills. He served as deputy attorney general under Attorney General Evelle Younger from 1971 to 1979.

He finished second behind Harris in a six-way June primary race.

(© Copyright 2014 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)