Democrat Letitia James has defeated Republican lawyer Keith Wofford in New York's attorney general race.
With her victory Tuesday, James becomes the first black woman elected to statewide office in New York.
The 60-year-old will also be the state's first black attorney general.
James is in her second term as New York City's public advocate, a post similar to an ombudsman.
The Democrat has vowed to use her powers to oppose policies of President Donald Trump.
Pending state suits challenge administration policies on immigration and the environment. Another accuses Trump's charitable foundation of breaking the law.
James will take over from Attorney General Barbara Underwood, who was appointed in May after elected Attorney General Eric Schneiderman resigned following allegations he physically abused women.
Underwood wasn't a candidate in the election.
Copyright 2018. The Associated Press. All Rights Reserved.