"If Roy Moore wins tonight, we officially have 49 states," one Twitter user proclaimed. Though in jest, it's difficult to find a more illustrative representation of tensions as election night in Alabama began.

Roy Moore

Roy Moore campaigned on much the same unrestrained style as President Trump. However, he was not endorsed by Trump until fairly late in the election cycle.

For a number of reasons, the election wasn't necessary, and it wasn't necessary for Republicans to lose, but according to a report by the New York Times, several factors played into that.

1) President Trump did not need to create that vacancy.

Plainly put, had the president chosen someone other than Jeff Sessions for the job of Attorney General, the special election would not have been necessary, and Republicans could have held onto a reliably Republican seat.

2) Allegations against Roy Moore made the issue of distance difficult.

Moore was accused by several women of improper sexual conduct, including one who alleges she was 14 years old at the time of the encounter, and others whose claims range from harassment to assault.

Republicans faced a difficult task with Moore - proximity.

If they were too close to a man they found abhorrent, or someone they believed their voters would find abhorrent, it could cost them. If they gave only lackluster support to a man who won the heart of their voters, once again, it could cost them. They opted to tacitly support Moore, but cut his funding.

However, at the eleventh hour, Senate Majority Leader Mitch McConnell scaled back his critiques of Moore, the RNC reinstated his funding, and the president gave Moore a full and unambiguous endorsement.

These factors complicated the race and may have contributed to Moore's loss.

Doug Jones

Though the factors involved in Jones' win include the aforementioned moves by the Republican party, many have pointed out a different factor in particular: race.

"97% of Black women and 92% of Black men voted for Doug Jones," journalist Ernest Owens writes on Twitter, "Stop acting like y'all don't know who needs to get it together in these polls."

Over the past year, others, like Senator Bernie Sanders, have been very critical of what they refer to as "identity politics," or what they see as the emphasis on characteristics like race or gender to the detriment of an emphasis on qualifications for a particular office.

No matter what, many Democrats across the country may see the Jones win as an analog to greater success in the primaries in 2018, just as many felt that a spate of Democratic wins earlier this year signaled a groundswell of grassroots pushback against the current administration.

Time will tell, but for the moment, people across the country are celebrating.