It was not your typical town hall. A Democrat and a Republican stood side by side at the front of a high school auditorium, not to debate but to show voters where they agree. The evening began with the Democrat touting his recent vote against a tax increase and ended with the Republican inviting everyone to join her on a hike to celebrate Earth Day.

Welcome to the center of California’s political spectrum.

The right-leaning Democrat, Sen. Steve Glazer, and the left-leaning Republican, Assemblywoman Catharine Baker, represent overlapping suburban districts some 40 miles east of San Francisco. Once opponents who ran for the same seat (she won), the pair have forged an unusual bipartisan alliance driven by their centrist approach to politics.

Both lawmakers have broken from their parties on landmark issues—Glazer opposing the recent gas-tax increase Democratic leaders pushed to fund road repairs and Baker supporting a climate change bill that all other Republicans opposed. They co-sponsor some of each other’s bills and have made joint town hall meetings a habit, hosting 10 of them over the last two years.

“We want to work together on solutions and set a tone and try to be constructive,” Baker told roughly 200 constituents gathered last week at Dublin High School. “We are not (in the Legislature) to be partisan talking heads.”

Not that they agree on everything. Baker voted against increasing the minimum wage to $15 an hour, a bill Glazer ultimately supported. Glazer voted for a bill that would make California a so-called “sanctuary state” by barring local law enforcement from helping federal immigration authorities—and although Baker has yet to vote on the bill, she sounded wary of it at the recent town hall.

Still, Baker, a cool-under-pressure attorney who values small government and free markets, and Glazer, a longtime Democratic operative with a penchant for bow ties, usually vote the same way. Both represent a stretch of mostly white, well-to-do suburbs in Contra Costa and Alameda counties, and both of them have benefitted from significant campaign spending by charter school advocates and business interests.

Their atypical alliance is due, in part, to changes voters approved to California’s political system. In 2011, California switched to an open primary that allows two candidates from the same party to face off in the general election. A year later, new term limits took effect, allowing legislators to stay in the same office for up to 12 years—double the time previously allowed in the Assembly.

The changes have hardly triggered a bipartisan chorus of kumbaya across the state. But they have nudged the political landscape enough to create, in Baker and Glazer, a bipartisan partnership at the center of the political spectrum.

The open primary was meant attract more centrist candidates from both parties by allowing the two candidates garnering the most votes to advance to the general election, regardless of their party affiliation. The new system made a big difference for Glazer, whose anti-union positions made him an enemy of organized labor.

“If you run not just thinking ‘I have to be the best Democrat,’ it means you run saying ‘How can I occupy the center?’” he said.

The goal becomes appealing to Republicans, Independents and Democrats—a tactic that worked when Glazer squared off against a Democrat backed by labor unions in his 2015 race for state Senate. Glazer argued during the campaign that he wanted to change the law so that Bay Area Rapid Transit workers are not allowed to strike, a proposal he’s still pushing in the face of union opposition.

His tack to the right came after a long career working closely with Democratic Gov. Jerry Brown. He managed Brown’s gubernatorial campaign in 2010 and helped Brown pass the Proposition 30 tax increase in 2012 with strong support from organized labor. But their relationship appears to have soured—Brown did not endorse Glazer in his legislative campaign, and Glazer crossed Brown by voting against the governor’s gas tax increase.

He won his Senate seat a year after losing an Assembly race against Baker and a more liberal Democrat. Glazer finished in third place, then made the unusual move of endorsing Baker in the run-off. Republicans make up just 29 percent of the district, but Baker was able to win by attracting support from moderate Democrats and nonpartisan voters.

The rightward drift of Glazer irritates traditional Democrats who enjoy overwhelming control of the state Capitol. State Senate leader Kevin de Leon and party chairman John Burton declined to comment for this story. Steve Smith, a spokesman for the California Labor Federation, which represents unions that backed unsuccessful opponents against both Glazer and Baker, questioned whether their partnership is genuine.

“I wouldn’t call either one of them a centrist,” Smith said. “I would call both of them political opportunists.”

“Baker tries to positions herself as a Democrat on many issues and Glazer… (campaigned) toward Republican voters because he knew he needed those to win his election. But then you try to figure out ‘What do these folks really stand for?’ And that becomes really unclear.”

Crossing party lines is more acceptable to Republican leaders in Sacramento, who recognize that the GOP is simply too small in California to get anything done on its own. Republicans hold less than one-third of seats in the Legislature and not a single statewide office. So for the Assembly’s Republican leader, the relationship between Baker and Glazer is something to celebrate.

“I would suggest that others should do the same thing,” said Assemblyman Chad Mayes of Yucca Valley. “This idea that we can’t talk to one another is just ridiculous.”

The switch to longer term limits is making things friendlier in the state Capitol, another factor at play in the relationship between Baker and Glazer. Under the old system—where lawmakers were limited to six years in the Assembly and eight in the Senate—politicians began positioning themselves for a run for higher office nearly as soon as they were elected. Under the new system—knowing they can stay in place for up to 12 years—legislators are building deeper relationships with each other. The idea that they could be working together for many years is one reason Baker said she’s pursued the partnership with Glazer.

Constituents at the town hall reacted well to their joint presentation—the mood was overwhelmingly civil and punctuated by occasional rounds of applause. “I feel that these two are doing a good job for us,” said Sheila Cotter, a retiree who lives in Pleasanton and is registered to vote without a party affiliation. “They’re working on real issues that are substantive.”