Two months after former Attorney General Eric Schneiderman resigned over allegations of abusing multiple women, and roughly two months before the statewide primary elections, the Democratic race to replace him is taking shape.

New York City Public Advocate Letitia James is hoping to dispel the idea that she is the establishment candidate and Fordham Law professor Zephyr Teachout is embracing her image as an outsider who would challenge Gov. Andrew Cuomo, while the campaign strategies of Rep. Sean Patrick Maloney and Leecia Eve remain elusive.

At first, James seemed to be the prohibitive favorite. She was nearly installed in the office for the rest of Schneiderman’s term by the state Legislature and she won the party’s designation at its statewide convention in May.

But the race, like the rest of New York politics, was upended by the recent victory of Alexandria Ocasio-Cortez over longtime Rep. Joe Crowley in the Democratic primary in the 14th Congressional District. Teachout, one of the early endorsers of Ocasio-Cortez, is hoping that the same anti-establishment, anti-corruption wave will also carry her to victory. Teachout has a history of impressive performance: in 2014, entering the race with no name recognition or fundraising network, she managed to pull one-third of the Democratic gubernatorial primary vote.

The entry of two other candidates also complicated James’s path to victory: Eve is, like James, an African-American woman and a veteran of New York Democratic politics, so they may compete for many of the same voters. Maloney’s atypical political profile – a gay man who is to the right of most Democrats, in keeping with his upstate district – might lead him to pull votes from both James and Teachout, but he is very unlikely to take much from Teachout’s activist liberal base. In a low-turnout event, such as an off-year primary, that base can comprise a sizable chunk of the electorate. Teachout may lose some progressives to James, but – by lowering the percentage Teachout would need to win a plurality – the entry of more candidates could give her a better shot at an upset victory.

The early polling already points to a divided field. In a Quinnipiac poll released this week, James led the field with 26 percent of the registered Democrats who responded. But 42 percent of Democratic voters remained undecided, while Maloney had 15 percent, Teachout 12 percent and Eve just 3 percent.

RELATED: The endorsements for AG so far

Bruce Gyory, a Democratic consultant with Manatt, Phelps & Phillips, argued that the effect of the Ocasio-Cortez victory was being overplayed, and that the likeliest predictor of victory was past performance. If so, that’s good news for James. James’s steady winning streak includes two terms in the City Council and two terms as public advocate, which has raised her profile among New York City voters, who comprise 52 percent of the Democratic statewide electorate. Gyory predicted James would get strong support from the African-American community, and in particular, black women, who have supported her in previous elections.

Although Teachout may have more name recognition upstate, where she won most of the counties in 2014, Gyory also noted that black voters who may turn out for James represent 20 percent of the upstate Democratic electorate.

Voters could be motivated by exhaustion with corruption in Albany, as two previous legislative leaders, former state Senate Majority Leader Dean Skelos and former Assembly Speaker Sheldon Silver, and a former top aide to Gov. Andrew Cuomo, Joseph Percoco, have been found guilty on corruption charges. “I do think that we might see people who are inspired and motivated by Alexandria Ocasio-Cortez's win, and may vote for their first choice candidate and not just for their second choice candidate,” Christina Greer, an assistant professor of political science at Fordham University and a McSilver Fellow at New York University, said. “After (James’) endorsement from Cuomo, and how she disavowed the Working Families Party, it may inspire some progressives to not necessarily vote for Tish – who has been a progressive champion – but vote for someone like Zephyr Teachout.”

James is hardly an avatar of the white, male, moderate Democratic Party, as Crowley was. A former public defender and assistant attorney general in charge of the Brooklyn regional office, she was elected to the New York City Council in 2003 solely on the Working Families Party line. In 2013, James became the first black woman to win citywide office. James has often challenged de Blasio from the left, suing his administration on issues such as the Department of Education’s insufficient tracking systems for children with disabilities, although her ability to bring sue the city has been blocked by state appellate courts.

In May, James received criticism for refusing the WFP endorsement for attorney general. Her detractors believed she was denouncing her former champions in order to curry favor with Cuomo, who is engaged in a long-simmering feud with the party.

Meanwhile, James has been endorsed by many figures who could be considered the Democratic establishment, including a raft of elected officials and several unions.

In an interview with City & State, James said that she did not accept the WFP line in May because she was focusing on obtaining the Democratic designation for attorney general, and there are far more Democrats than WFP members in the state. (However, one can simultaneously run as the candidate of both parties, so there is no inherent conflict in seeking both nominations.) She said that there was “no sunshine” between her and the WFP, and that she would accept the party’s endorsement if it was offered later. “I have been the face of the WFP for a very long time and I have never walked away from their values,” she said.

Without even being prompted, James challenged the idea that she was an establishment candidate. She argued that no one had considered her to be a member of the Democratic machine until she began running for attorney general. “By virtue of who I am, I’m an outsider candidate,” James said. “As a woman, and a woman of color, I think it’s critically important that individuals understand that we need a diversity of opinions and positions in leadership positions all throughout New York.”

Many observers agree that her record and biography will insulate her from charges of being too much of an insider. “I think you'd be hard-pressed to look at James and say she's not a progressive,” said Jeanne Zaino, a political science professor at Iona College.

However, by dint of accepting the endorsement of mainstream Democrats, James is tied to Cuomo. “When you get endorsed by the governor, who is clearly the establishment candidate, I think being a frontrunner is a double-edged sword,” Greer said.

Similarly, Teachout is connected to Cuomo’s Democratic primary opponent, Cynthia Nixon, for whom she briefly served as campaign treasurer. Teachout demurred when asked if she was running on a ticket with Nixon, simply saying that there is “a progressive, truth-telling outsider wave in New York politics.” She did note that the volunteer bases for many of the progressive candidates across the state overlapped.

According to her campaign, James has raised over $1 million for her campaign so far, with 50 percent of donors contributing $100 or less. Teachout led the attorney general candidates in small-dollar fundraising, with 97 percent of donors giving $200 or less, indicating a groundswell of enthusiasm for her campaign.

Prominent city figures tout James’ advocacy on behalf on working class citizens. Stuart Appelbaum, president of the Retail, Wholesale and Department Store Union, called James the “true progressive candidate.”

Bill Samuels, a progressive activist and founder of the good government group EffectiveNY, said that he respected both James and Teachout and would vote for either if they won the primary, but that James was more able to reach to average voters. “Tish uniquely connects, especially in New York City, to the pains of our diverse communities that are struggling to make it,” Samuels said.

The calls to City & State from Appelbaum and Samuels were unsolicited. (Having high-profile surrogates contact reporters is a common tactic by Cuomo, the ultimate establishment figure in the state.)

On the other end of the party’s ideological spectrum, Maloney’s decision to join the race remains confounding to experts. He is simultaneously running for re-election to Congress and in the Democratic primary for attorney general, which might be challenged in court, as it is impossible to appear for two positions on a ballot. If Maloney won the nomination for attorney general, he would drop out of the congressional race, leaving Democrats without an incumbent in a competitive district – something that may weigh on the minds of the committed partisans who vote in primaries.

Maloney sent out a press release saying he raised over $1 million in the first few weeks of his campaign with $4.1 million in cash on hand, as well as 1,500 individual donors, with 90 percent of those funds coming from donations of $200 or less. It’s unclear how much of the $1 million was transferred from his congressional campaign account.

Maloney said recently that he doesn’t care about what the state Democratic Party – which naturally would prefer that Maloney not jeopardize a congressional seat when control of the House of Representatives is being closely contested – believes about his campaign. “Since when the hell do we think the state Democratic Party knows what the hell it’s doing?,” he said in a call with reporters in June.

However, experts wonder if Maloney knows what he is doing. “He is in a really good position to have a real impact where he is, he had no competition in terms of the primary issue, and to run for both just gives his Republican opponent something to talk about,” Zaino said. Maloney would face Republican James O'Donnell in the general election. Greer described Maloney as “a man who sees three women running and decides that he should jump in.”

“I'm not exactly sure who he takes votes away from, aside from people who need to vote for a man,” Greer said. Maloney is apparently aware of the risk that his gender could be a liability in this field – especially when the last elected attorney general was accused of beating multiple women – and he is trying to present himself as a women’s rights champion. He recently called out the House Committee on House Administration for refusing to allow his office to purchase tampons. His opponents have begun to exploit his vulnerability on women’s issues. On Monday, Teachout criticized Maloney for endorsing anti-abortion rights Republican candidates such as state Sen. Bill Larkin in the past. Maloney declined an interview for this article.

Eve’s position in the race also remains somewhat of a mystery, although her campaign reported nearly $400,000 donations. A former Cuomo and Hillary Clinton official, Eve could not be reached for comment.

Despite being the daughter of prominent Buffalo public officials, as a first-time candidate with no known ideological distinction from her opponents, it’s unclear how she can garner votes. “Leecia Eve can do very well in Buffalo, but she doesn't have the support of the very popular four-term mayor and state chair, Byron Brown, nor the very popular local assemblywoman, Crystal Peoples-Stokes, who seconded the nomination of James at the convention,” Gyory said. Eve has been endorsed by the Erie County Democrats.

The two frontrunners, Teachout and James, offer competing visions of what the purpose of the attorney general’s office should be. “The New York state attorney general's office is, I believe, the most important legal office in the country in the Trump era,” said Teachout. “I feel like there's a tendency to look at it as another race, or number two or three in New York state, in traditional political terms. This is actually a fight about the future of law in America itself and the most important legal office in the country.”

James believes that being attorney general is first and foremost is about helping New Yorkers with local issues, and secondarily about challenging what she sees as federal injustices. “Obviously, we need to stand up to the abuse that is coming from Washington and attacks on our rights as citizens and attacks against our values,” James said, adding that she looked forward to “waking up every day, going into the office, suing this administration and then going home.” However, she said that she was also concerned with helping New Yorkers on more local issues, such as tenant rights and workers’ rights. “There's a wide range of issues that are impacting New Yorkers, and what we need is an attorney general as a track record of getting things done and speaking truth to power standing up for marginalized communities.”

Despite her lack of institutional support, Teachout believes that she can win by redefining what it means to be a “viable” candidate. “Viable is not defined the pundits, viable is defined by grassroots energy and moral clarity, and the old rules are off and we're creating new rules,” Teachout said. She is betting that the same enthusiasm that helped Ocasio-Cortez’s campaign become viable will translate into success of insurgent candidates statewide and her own victory.

Correction: An earlier version of this post incorrectly identified the Republican running against Rep. Sean Patrick Maloney for Congress.