Former Democratic President Barack Obama endorsed fellow Democrat Gavin Newsom for governor of California on Wednesday and praised him for being “the first to recognize the right to marry who you love” when he briefly legalized gay marriage in 2004, during his time as mayor of San Francisco.

“I’m proud to endorse such a wide and impressive array of Democratic candidates — leaders as diverse, patriotic, and big-hearted as the America they’re running to represent,” Obama said in a statement. “I’m confident that, together, they’ll strengthen this country we love. … But first, they need our votes.”

Newsom will face Republican John Cox, who was endorsed by President Donald Trump in May — a nod that helped him finish in the second place spot during the June primary. Also this week, Assemblyman Travis Allen (R-Huntington Beach) — who was also a candidate for governor — endorsed Cox.

Newsom, who supported Hillary Clinton in 2008, was among 81 candidates Obama endorsed before the November midterm election. Ten of the Democrats Obama endorsed are in California, including Newsom.

Today I’m proud to endorse such a wide and impressive array of Democratic candidates – leaders as diverse, patriotic, and big-hearted as the America they’re running to represent: pic.twitter.com/gWzalQhFas — Barack Obama (@BarackObama) August 1, 2018

Obama also endorsed one Democrat over another in two races where Democrats are facing off against each other. California’s top-two or “jungle” primary allows the first and second place winners of the race to run against one another in November, regardless of political party.

According to CalMatters, he endorsed Eleni Kounalakis for lieutenant governor (the post Newsom currently holds) over fellow Democrat and California state senator Ed Hernandez. “And in his only endorsement of a California state legislative race, he also endorsed Buffy Wicks in an East Bay assembly district over fellow Democrat and Richmond City Council member, Jovanka Beckles.”

According to CalMatters, both Kounalakis and Wicks worked for Obama.

In May, Obama chose to endorse Sen. Dianne Feinstein (D-CA), who is seeking her fifth term, over former State Senate President pro Tem Kevin de León (D-Los Angeles) in May. De León received the endorsement of the California Democratic Party last month. He hosted an “ABOLISH ICE CREAM SOCIAL” that night.

During his endorsement of Feinstein, Obama called her “an indispensable leader for California.”

Adelle Nazarian is a politics and national security reporter for Breitbart News. Follow her on Facebook and Twitter.