OAKLAND — In 2008, Rebecca Kaplan made history when she became the first out lesbian to win a seat on the Oakland City Council. Now, the two-time incumbent is facing a tough re-election fight against Margaret “Peggy” Moore, a former senior adviser to Mayor Libby Schaaf. Moore is also openly gay.

The two longtime LGBT activists were once political allies. But then Moore filed candidate papers to run for the at-large seat occupied by Kaplan, right before the August deadline. It has been a bitter campaign, with both accusing the other of unethical behavior.

The campaign’s tone went sour early on when the Moore campaign’s polling firm, EMC Research Inc., emailed a poll to Oakland voters that stated falsely that she was supported by U.S. Rep. Barbara Lee and State Assemblyman Tony Thurmond D-Richmond. Both elected officials said they did not endorse Moore, and Thurmond recently endorsed Kaplan.

Moore says she didn’t know about the misleading poll question. And when she learned what had happened, she issued a correction. Kaplan called it “fraud.”

Kaplan has intimated that Schaaf, who she lost to in the 2014 mayoral election, pushed Moore to enter the race. “I don’t know what’s in Miss Moore’s heart,” Kaplan said. “But I know the mayor and the mayor’s people are her primary backing.”

Moore denounced what she called a false rumor started by Kaplan. She said she made up her mind to run for council because she felt that she’d been “playing it safe” working behind the scenes for an elected official rather than taking on the responsibility of a leadership position herself.

“I felt like my time was now,” she said.

This isn’t Moore’s first foray into politics. She ran unsuccessfully in 2005 for City Council in District 2. She’d also entered the 2013 race for Assembly District 18 but withdrew. And in June, Moore ran unsuccessfully for a seat on the Alameda County Democratic Central Committee.

The at-large seat is a citywide position that represents all 400,000 residents, rather than focusing mostly on one council district. As a result, it’s a launching pad for those with aspirations for higher political office. Since she was elected, Kaplan has run for mayor in 2010 and 2014, losing first to Jean Quan, and then Schaaf.

There are three other candidates vying for the at-large seat. Bruce Quan, a retired attorney; Matt Hummel, a businessman who chairs the city’s Cannabis Regulatory Commission; and Nancy Sidebotham, a tax preparer and longtime community activist who has run for council and mayor in the past.

The main contenders. however, are Kaplan and Moore, the former California political director for President Barack Obama’s 2012 re-election campaign.

Moore said she would be a “more intentional communicator” with constituents citywide. She said she would create a team of volunteers to help her communicate what is going on at City Hall to the community.

“Peggy has run a pretty aggressive campaign with a lot of TV, but I don’t think she has made the case to replace Rebecca,” said political consultant Jim Ross.

Ross, who worked on Kaplan’s 2010 mayoral race, said winning this race is critical for her future political prospects. “If she were to lose, I don’t think there is a clear and obvious path as to what her comeback would be,” he said.

Kaplan said that she is proud of her record. She pointed to her leadership in bringing forward a motion for a council vote on the controversial coal export issue. She also authored Measure JJ, on the Nov. 8 ballot, which she said would help protect renters.

If elected, Kaplan said she would continue to push policies for cracking down on illegal dumping. She’s also proposed changes in the Police Department’s hiring and recruitment practices in the aftermath of a department sex scandal. Kaplan said she would also work to insure local hiring in future construction projects.

“I am very proud of my record fighting for the needs of Oakland, even in the face of pressure,” Kaplan said.

Joe Tuman, a political analyst and San Francisco State professor who ran against Kaplan in the 2010 and 2014 mayoral races, said the challenge of being the at-large member is that there’s a whole lot of ground to cover.

“If you go out into the districts, people will say they don’t see much of her (Kaplan),” Tuman said.

Moore’s political savvy and connections, Tuman said, have made it a competitive race. However, he said, “it’s pushing a rock up a hill to get over an incumbent.”