As Marc Levine was considering a run for the newly created 10th Assembly District seat, he said he received a call from Assembly Speaker John Perez, one of the state's most powerful Democrats.

"You deserve to be in the Legislature," Levine said he was told. "But it's not your time."

Perez, D-Los Angeles, told Levine the Democratic leadership in Sacramento and the North Bay would support Levine's opponent, Michael Allen, in the new district.

Allen currently represents the 7th Assembly District, which was redrawn during redistricting. He has rented an apartment in San Rafael to establish residency within the new 10th District, which encompasses all of Marin County and parts of southern and western Sonoma County, including a portion of Santa Rosa. Levine is a first-term San Rafael city councilman.

As the June 5 primary campaign draws to a close, Allen and Levine appear to be the front-runners, setting up a potential battle of two Democrats in the November general election. This year will be the first statewide election where the top two candidates, regardless of political party, advance to face off in November.

Political analyst David McCuan, a Sonoma State University politics professor, called the new district "hyperactive" or "hyperaware" because its residents are so politically involved.

"They are well educated and well informed, so they'll have a lot of cues on which to draw," he said.

Five other candidates are seeking the seat: Joe Boswell of San Rafael, an independent who worked on the 2008 Obama presidential campaign; Alex Easton-Brown, a Democrat and president of the Marin United Taxpayers Association; Democrat H. Christian Gunderson, a Petaluma mental health counselor; Peter Mancus, a Republican small-business owner from Sebastopol; and Democrat Connie Wong, a Corte Madera real estate agent.

Levine, 38, a San Rafael city councilman since 2009, said Perez's admonition bolstered his resolve.

"The local voters should have a choice," he said. "Sacramento was trying to muscle in their candidate."

Allen, 64, is the former general manager of the Service Employees International Union Local 707 and director of the North Bay Labor Council. He was elected in 2010 to represent the 7th District after serving on the Santa Rosa Planning Commission and working as a district director for former state Sen. Pat Wiggins. He is a registered nurse and an attorney.

Levine's assertion about the Perez call is misleading, Allen said.

"You're not anointed by holy oil to elected office," he said. "You have to earn it, and I did with local people's support."

Levine is a software creator who has his master's degree in national security affairs from the Naval Postgraduate School in Monterey. He has positioned himself as an alternative to the traditional political machinery that he said is often blind to local concerns.

He said Allen has been dishonest and disingenuous — from his move into the district, to ethics violations, to his recent vote against the Rohnert Park casino compact after eight years of supporting it.

"How can you look someone in the eye after that?" Levine said. "We have concerns about who represents us. We need to start thinking differently."

Allen has deep support among the state's largest labor unions — which can be a political strength or a hindrance in an era when public-sector benefits and pensions are a divisive issue, McCuan said.

Allen sits on a state committee that is tasked with addressing the state financial crisis caused in part by hefty pensions of public employees, many of whom are union members Allen previously represented.

He said he is the perfect person to work on pension changes.

"When you are a true friend to a particular constituency, like I have been to labor over the years, part of it is being honest with them," Allen said. "I told them, we need to work on reform so it's sustainable."

Levine is a member of an ad-hoc Marin County committee that has reached pension agreements with county labor unions, including reduced benefits, higher retirement ages and increased employee contributions.

McCuan said the big money Sacramento and large labor unions have poured into Allen's campaign are a recognition that Allen needed to introduce himself to a new constituency in Marin.

Allen has raised almost seven times more money than Levine in the past five months, $368,000 compared to Levine's $63,400, as of May 18. Most of Allen's contributions have come from outside the district, from labor unions and in non-monetary assistance from the Democratic State Central Committee.

While Levine characterizes that as Sacramento selecting Allen, Allen said he simply appeals to a broader base.

"Michael Allen has pretty good name recognition (in Sonoma County), but some baggage too — as a result, you get the money to limit the negative hit," McCuan said.

Levine's camp has highlighted a $3,000 fine levied on Allen by the Fair Political Practices Commission in 2011 for voting on matters in which he had a financial interest while he was a Santa Rosa planning commissioner. Allen has said it was an innocent mistake.

Allen has also taken criticism over continuing to be paid by two North Bay labor unions after he took office last year. Neither of the associations is affiliated with public employee unions.

Allen's strong financial backing makes it difficult for a challenger, McCuan said.

"Allen is a well-known, well-heeled, well-oiled political machine," he said, "running against someone like Marc Levine who is trying to break through."