WASHINGTON ― New Hampshire Gov. Maggie Hassan (D) declared victory Sen. Kelly Ayotte (R) on Wednesday morning, after an expensive and razor-close Senate race.

Ayotte, a former prosecutor, has been a leading female voice among Senate Republicans since 2011. In the purple state of New Hampshire, she has tried to portray herself as a moderate Republican. She struggled during the campaign with whether to distance herself from GOP presidential nominee Donald Trump, who repeatedly denigrated women, Muslims, Mexicans, immigrants and others. Ayotte said in early October that she was voting for Trump and that he was “absolutely” a good role model for children ― a comment she later tried to walk back after Hassan highlighted it in political ads.

Weeks later, when a 2005 video emerged in which Trump bragged that he could grope women’s genitals because he was a celebrity, Ayotte changed her mind and said she could no longer vote for him.

Hassan bested Ayotte by fewer than a thousand votes. Ayotte conceded later on Wednesday.

Hassan, the relatively popular governor of New Hampshire since 2012, was endorsed by the powerful women’s PAC EMILY’s List. She made women’s health issues central to her campaign, hitting Ayotte for voting six times to defund Planned Parenthood and repeatedly voting to repeal the Affordable Care Act, which guarantees women free access to contraception.

Ayotte’s campaign responded by handing out condoms on college campuses to highlight a bill she sponsored that would make birth control available over the counter. She criticized Hassan’s support for Obamacare, which Ayotte claims is driving up health care costs.

This story has been updated with news that Ayotte conceded.