When Gregory Vega learned that Doug Jones — his friend and a lifelong Democrat who had never run for political office — was throwing his hat in the ring for a Senate seat in ruby-red Alabama in 2017, he didn't mince words.

"I obviously told him I'd support him 100 percent, both in time and financially, and I was just candid with him — it's going to be an uphill battle," Vega, who worked as U.S. Attorney under Bill Clinton with Jones, told NBC News.

It was a battle Jones won Tuesday night, pulling off a victory over Republican Roy Moore by a narrow but decisive margin of more than 20,000 votes.

Related: Moore vs. Jones: Where the Alabama Senate candidates stood on the issues

"Doug has never been one to shy away from challenges," Vega said prior to Jones' projected win Tuesday night.

Despite being painted by President Donald Trump as "weak on crime" and as an "elite" by his Republican rival, friends who have known the 63-year-old Jones for decades highlighted his working-class roots, willingness to work with political rivals, and the high-profile prosecution of KKK members.

"Anyone who would call him an 'ultra-elite' doesn’t know Doug Jones," said Paul Coggins, who has known Jones for nearly two decades. "He's the kind of person that can talk to princes and paupers."

"Doug is the opposite of ultra-D.C. liberal," he added.

Coggins, another former U.S. Attorney under Clinton, described Jones as a candidate that ran on "bread and butter dinner table issues" — able to speak to regular people about what affects their daily lives — and as the perfect candidate for the current political climate.

Related: Democrat Doug Jones is projected winner over Roy Moore in Alabama Senate race

Jones was nominated by Clinton, a Democrat, and confirmed by a Republican-led Senate in 1997 to serve as U.S. Attorney, for instance. Also, when he took on the case to prosecute two KKK members in the late 1990s, the state’s then-Republican attorney general, Bill Pryor, assisted Jones with the case.

"I think Doug is the kind of guy we need more of in D.C., who is not hyper-partisan," Coggins said, adding that he is a "bridge-builder."

"He has the common touch and can work with anyone," Coggins said. "In my mind, Doug is going to be a workhorse senator, not a show horse."

Jones has been described as a "moderate Democrat" and calls himself "mainstream."

"If you look at the positions I’ve got on health care, if you look at the positions I got on jobs, you should look at the support I have from the business community, I think I’m pretty mainstream," Jones said in November.

Jones is pro-choice and pro-LGBT rights. He also believes in climate change. However, he has said as the son of a steelworker and grandson of a coal miner he will advocate for job retraining programs and health care to carry out-of-work miners.

He also supports tax cuts for the middle class and for corporations. He believes the Affordable Care Act needs to be fixed — but not repealed, and said he was “disturbed” by efforts to do so.

He also promised to make criminal justice reform a top priority in office, starting with creating options for alternative sentencing.

The 16th Street Baptist Church bombing

The year was 1963. Four Ku Klux Klan members bombed the 16th Street Baptist Church in Birmingham, Alabama — killing four young black girls.

It was a case that shocked the nation and galvanized the Civil Rights Movement.

The case was hot and cold for decades. One suspect was prosecuted in the late 1970s, one died and two were never brought to justice.

That is, until a new, young U.S. Attorney for the Northern District of Alabama named Doug Jones took the case.

Prosecutor Doug Jones arrives at the Jefferson County Criminal Justice Center in Birmingham, Alabama on May 6, 2002. Dave Martin / AP file

He had skipped law school class to watch one of his political heroes Bill Baxley, then-Alabama attorney general, prosecute the first case inside in the courtroom in 1977 as a law student.

"It was one of the most amazing things I’ve ever seen," he told The Los Angeles Times in 2013. "The history, the power, that the law can change things for good, that public-service lawyers can have an effect on the world around you."

Then in the late 1990s, Jones, tapped by Bill Clinton to serve as U.S. Attorney, faced the daunting task of reopening a case that haunted the local community and vexed the nation for decades. He attempted to deliver justice and closure standing in the same courtroom he had watched Baxley.

He, however, secured indictments against Thomas E. Blanton Jr. and Bobby Frank Cherry — the two accused Klan members — in 2000. And in 2002, the men were convicted.

Jones, in his late 40s at the time, said to the jury that it was "never too late for justice," during closing arguments. He hugged Chris McNair, the father of one of the girls killed, after exiting the courthouse and Jones fought back tears telling reporters: "We're happy for the families. We're happy for the girls."

From the steel mill to the Senate

But, long before Jones was catapulted on the national stage in a dizzying special election, he built a career in Alabama.

He was born into a working-class family in Fairfield, a suburb of Birmingham. His father was a steelworker and his mother was a stay-at-home mom.

He said that he developed a love for politics and organizing growing up in Alabama, working on his high school's student government association during the era of school desegregation.

"Birmingham was two towns — a black town and a white town," he recalled to The Los Angeles Times in 2013. "It took me getting into junior high to see things changing. My elementary school was all white, but when I went to the seventh grade I for the first time went to a school that was integrated, and the kids started adapting, trying to work together."

Darnell Gardner, who is black and went to high school with Jones, told The Montgomery Advertiser that Jones was always a peacemaker as white and black schools merged.

Democratic Senator elect Doug Jones greets supporters during his election night gathering the Sheraton Hotel on December 12, 2017 in Birmingham, Alabama. Justin Sullivan / Getty Images

"Whatever was about to happen, he was there to put it out," Gardner told the paper. "Doug was always that person who saw both sides and wanted to help move things."

He went to study government at the University of Alabama, but after his first year, his grades "weren’t that great," and his father made him work at the steel mill in Fairfield because he "needed some incentive to work harder," Jones told the paper.

He also volunteered for campaigns and various Democratic grassroots efforts in the state. He then attended Cumberland Law School at Samford University, a private Christian college in Homewood, Alabama. After graduating in 1979, he went to work for Democratic Alabama Senator Howard Heflin.

Heflin, who served from 1979 until 1997, was the last Democrat to represent Alabama in the U.S. Senate. Jones was an aide to Heflin, who was also a member of the Senate Judiciary Committee, from 1979 to 1980.

During that time he also married his wife, Louise, with whom he has three children, before leaving to work as a criminal defense lawyer but always held out hope he would serve his hometown in government one day.

"I was still the kid from Fairfield, but it planted a hope that I might one day return here to serve my state," he said in his campaign biography.