BIRMINGHAM, Ala. — The fact that Alabama’s voters have sent a Democrat to the Senate for the first time since Howell Heflin retired in 1997 is a stunner, exceeded in incredibility only by the events that led to it — not least, that the Republican candidate, Roy S. Moore, saw his already prodigious history of controversy grow during the campaign to include allegations that he had molested teenagers.

The least surprising thing about it all may be that the victorious Democrat is Doug Jones.

“Doug has an uncanny ability to be at the right place at the right time,” said Greg Hawley, one of Mr. Jones’s law partners in Birmingham, comparing that knack for being in the middle of history to that of the famous fictional Alabamian, Forrest Gump.

Before the special election on Tuesday, the largest of Mr. Jones’s historical moments, and perhaps still the most consequential, were the successful prosecutions of two of the Klansmen involved in the bombing of the 16th Street Baptist Church in Birmingham, nearly 40 years after the crime. Mr. Jones served as lead prosecutor.

Though he continued to be involved in some of Alabama’s highest-profile legal cases in private practice, the church bombing prosecutions were his last work for the federal government until he starts his new job in Washington.