When Karen McMahon went up on stage at Erie County Democratic headquarters in downtown Buffalo around 11:45 on election night, she told the crowd things were looking good but that she didn't know for sure whether she had beaten Republican Assemblyman Raymond Walter.
Moments later, Jeremy Zellner, the Erie County Democratic chairman, stepped to the lectern and proclaimed her the winner to raucous applause in the Larkin Center of Commerce.
"It was very dramatic," McMahon said in an interview the next day.
McMahon beat Walter, a seven-year incumbent, by 52 percent to 46 percent in the 146th Assembly district that covers the towns of Amherst and Pendleton.
The candidates and party officials say McMahon won because of the Democratic enrollment edge in the district, a blue wave that swept much of New York and similar communities across the country, significant financial support from Albany Democrats and an appealing message of change from the first-time candidate.
"I don't think there's anything that we could have done," Walter said the next day. "It's just the atmosphere of the whole race, the political landscape."
McMahon, 58, grew up in Snyder and has lived in Williamsville since 1997. She worked for about 30 years as a law clerk to state and federal judges, including the late John T. Curtin, until 2016, when she began practicing special education law with her husband. They have three daughters, all in their 20s.
McMahon said she was inspired to run for office by President Trump's 2016 election, which pained her, and by her experience helping out on Brian J. Kulpa's 2017 campaign for Amherst supervisor.
McMahon needed to introduce herself to voters in the 146th district. That's a lot easier to do with the financial support of Assembly Democrats, whose campaign arm pumped $220,0000 into the race. Republicans said that committee invested far more in the campaign's final week, although disclosure forms don't document that spending.
"I really felt that Amherst is changing," McMahon said.
Democrats make up 40 percent of registered voters, with Republicans at 32 percent and unaffiliated voters at 20 percent. Walter narrowly defeated his opponent two years ago and said he took some time before deciding to run for re-election this year.
"It certainly has become more of a Democratic district. You can't deny the demographics of it," Amherst GOP Chairman Joseph Heins said.
Across the state, Democrats picked up State Senate and congressional seats held by Republicans. Nationally, Democrats – particularly women – did well in diverse, well-educated and affluent communities that resemble Amherst.
"I think there was a little fatigue with the idea of a career politician, too," McMahon said.
McMahon's ads emphasized a platform of boosting education spending, improving the state's economy and expanding health care. She also wants to tackle corruption in Albany, calling it a bipartisan problem, and she favors term limits for legislators.
Amherst Democratic Chairman Jerry Schad said he thought McMahon came across as a credible candidate who is well-grounded in the issues.
Schad said he believes Walter had surprisingly little name recognition for an incumbent Assembly member, but Heins said Walter worked hard on behalf of his constituents.
Walter in the final days ran a TV ad attacking McMahon for her support of single-payer health insurance. The ad claimed the proposal would raise each Amherst resident's taxes by $18,000.
"I think that turned voters off," Schad said. "It's a preposterous notion, and I think people saw it for what it was."
Walter said the ad highlighted crucial information about McMahon's policy and helped keep the race close.
Walter, who served in the Erie County Legislature before winning his Assembly seat, said he will devote more time to practicing law but won't disappear from the political scene.
"I'm not going away," he said.
McMahon said she looks forward to talking to Walter during the transition period. She also will consult Assemblywoman Monica Wallace, D-Lancaster, about hiring staff and setting up her Assembly offices.
After the excitement of Tuesday night, McMahon said, life started returning to normal Wednesday. What was the first thing she did the morning after?
"I cleaned my kitchen a little bit," she said, laughing.