"You know my position ... either one of these will do," he said.

On policy, most of the differences broke along party lines.

The Democrats supported building housing, while still protecting environmental regulations that the Republicans blamed for the high cost of construction in California. All Democrats supported high-speed rail and the gas tax that both Republicans said they would repeal. No Democrat said they would have voted for a deal in Congress to protect DACA recipients in exchange for building a border wall.

The two Republicans, Cox and Allen, struck a hard line on immigration when asked about the large group of migrants that just arrived at the southern border, while the Democratic candidates cast the situation as a failure of the federal government to coalesce around immigration reform.

Villaraigosa said, "Those proving they are escaping violence should stay."

"We need to build bridges, not walls," he said, adding that immigrants contribute to the state's economy. "We ought to celebrate them and their work."

And Newsom said he plans to "push back against John Cox, Travis Allen, Donald Trump."

Perhaps the most interesting exchanges of the night came toward the end of the 90-minute debate, when the panelists asked about ads targeting Villaraigosa and Newsom, who both had affairs as mayors. Allen has also been accused of inappropriately touching a woman.

Eastin, in a shot at Newsom, declared it is "inappropriate for any boss to make any passes at any women that work for them. ... What's missing is courage and vision and heart and self-control."

Allen brushed off the accusations at him as a misunderstanding, and then took a swipe at Newsom.

"If you can’t trust Newsom with his best friend’s wife, how can you trust him with your state?" said Allen.

"I made a mistake and apologized, and am now working like mad to help women and kids," Newsom responded.

Villaraigosa struck a similar tone, saying he stands with the Me Too movement.

"I lost my marriage and my family," he added.

One of the final questions of the night came from KQED senior politics editor Scott Shafer, who asked whether gender or ethnicity should matter in this election.

Villaraigosa noted that he was the first Latino speaker of the Assembly and mayor of Los Angeles.

"I want to be a governor that unites this great state. This is the most diverse state in the whole world — this is a state thats engine is its diversity, and I am really proud of that,” he said. "Yes, I would be the first, and I recognize that, but I also recognize that the role of the first is to open up the door for the rest."

Eastin, the only woman on stage, said it’s not just about ethnic diversity.

"Race and gender matter, and we are making more progress electing people of diverse backgrounds than electing women," she said, "The reality is when you elect more women, more is invested in education, families seniors and health care, and guess what: That’s where we ought to be focusing right now."