TROY – Rensselaer County District Attorney-elect Mary Pat Donnelly promised to restore integrity to her soon-to-be office Friday as she was ceremonially sworn in as the county's next top prosecutor.

"I am so thankful to everybody. I won't let you down," Donnelly told a room of well-wishers in a first-floor courtroom in the Rensselaer County Courthouse. "And quite frankly, I just cannot wait to get to work."

Donnelly, 45, of East Greenbush, was sworn in by state Supreme Court Justice Andrew Ceresia, one of several judges, lawmakers and well-known local officials in attendance. Moments earlier, the judge swore in county Legislator-elect Carole Weaver, who will occupy the District 1 seat.

Donnelly's husband, Albany Detective Sgt. Patrick Donnelly, and five children and mother, Toni Murphy, the county's receiver of taxes, watched as the incoming district attorney took the oath.

"This is going to be quite a journey and I think you all know me well enough to know I'm not taking it lightly," said Donnelly, the daughter of late Albany Detective Timothy Murphy.

She said every decision she makes as district attorney "will be based on justice and law, equally applied to everyone."

Donnelly, the Democratic candidate, defeated incumbent District Attorney Joel Abelove, a Republican, with 55 percent of the vote to 45 percent, on Election Day.

One year ago Friday, Donnelly explained, she made a phone call to express interest in running against Abelove, whose four-year run was marked by scandal -- including facing criminal charges brought by the state attorney general's office on his handling of a 2016 deadly police shooting of anunarmed DWI suspect.

"It really felt like we were all on a mission to do the right thing and to restore integrity to the district attorney's office," Donnelly said. "I feel like that message was heard loud and clear and I know what I am tasked to do going forward."

Donnelly, a former town justice in East Greenbush who had worked as a deputy state's attorney in Vermont, thanked the county's Democratic committee chair, Michael Monescalchi, and party committees for their early support.

Donnelly thanked supporters who carried her campaign literature and petitions, donated to the campaign and allowed their homes to be used. She highlighted the passing of Pete Stenson, a strong worker for her campaign, in October.

Also in attendance were state Assemblyman John McDonald, state Sen. Neil Breslin, former Albany Mayor Jerry Jennings, Troy Mayor Patrick Madden and former Troy Mayor Lou Rosamilia.