Democrat Doug Jones pulled off a stunning defeat of Republican Roy Moore on Tuesday to win a seat in the U.S. Senate after a contentious campaign that was rocked by allegations that Moore sexually assaulted women and teens dating back over 40 years.

According to the Associated Press and CNN, Jones pulled out the victory after trailing for months. Moore's run for federal office slowly collapsed after he was buffeted by sex abuse accusations.

With his stunning win, Jones becomes the first Democrat to hold an Alabama Senate seat in 25 years.

Republican nominee Moore defeated incumbent Luther Strange in a contentious primary that saw President Donald Trump throw his support behind Strange, only to have Trump later support Moore after the abuse allegations were leveled against him.