This image posted on a militant news Twitter account on Thursday, June 12, 2014 shows militants from the al-Qaida-inspired Islamic State of Iraq and the Levant (ISIL) removing part of the soil barrier on the Iraq-Syria borders and moving through it. (AP Photo/albaraka_news, File)

For much of 2014, I told anyone who would listen — so not that many people — that Sen. Rand Paul (Ky.) was a strong dark horse to be the Republican presidential nominee and may even wind up in the top tier when the 2016 race actually started in earnest after the midterm elections.

Then the Islamic State emerged on the world stage. And Paul went from real contender to fringe player.

Paul formally ended his campaign for president Wednesday, saying in a statement that despite the fact that "thousands upon thousands of young people flocked to our message of limited government, privacy, criminal justice reform and a reasonable foreign policy," the time had come to step aside.

But the truth of the matter is that Paul's campaign was effectively over the minute the Islamic State began beheading Westerners, lighting people on fire and seizing towns in the Middle East in the summer and fall of 2014. (Time magazine has an excellent timeline of the rise of the Islamic State.)

"The environment as we started this race just was not as friendly to Senator Paul,” chief strategist Doug Stafford acknowledged Wednesday. "Like most other issues, foreign policy has a rise and fall and an ebb and flow in public opinion."

Here's why: Paul's entire candidacy was premised on what he described in his dropout statement as a "reasonable foreign policy" (and what his opponents cast as isolationism). His father, former congressman Ron Paul (R-Tex.), had put that same non-interventionist worldview at the center of his own 2008 and 2012 campaigns and had significant success — suggesting that the typically hawkish Republican Party was growing more libertarian by the day.

"Today, I will end where I began, ready and willing to fight for the cause of Liberty," Sen. Rand Paul (R-Ky.) said in a statement Feb. 3, announcing he is ending his presidential campaign ahead of the New Hampshire primary. (Sarah Parnass/The Washington Post)

That movement within the GOP combined with the fact that Paul appeared to have all of the loyal libertarian following of his dad and the added ability to reach out to some establishment players and major donors is what convinced me that he had real potential to surprise in the race.

That all began to change in mid-August 2014 when the Islamic State beheaded James Foley, a U.S. journalist, on camera. Suddenly, concerns about national security and terrorism, which had been in the single digits among Republicans for much of the past few years, shot upward. In March 2012, an NBC-Wall Street Journal poll showed that just 8 percent of Republicans thought terrorism was the most important issue facing the country. By May 2015, that number was 27 percent — making it the top issue for Republicans.

By the time the Paris attacks and the shootings in San Bernardino, Calif., happened late last year, the parameters of the debate surrounding national security and terrorism had hardened. Republicans, in the main, wanted a muscular foreign policy designed to root out and kill terrorists abroad so that they couldn't kill us here.

Donald Trump's rise epitomized what Republicans were looking for. "We are going to bomb the hell out of ISIS," he would promise crowds — always to much cheering. Chris Christie, Marco Rubio and Ted Cruz gave voice to similarly aggressive rhetoric about how to handle the rise of the Islamic State.

All of which left Paul on the outside looking in. The truth is that he was a candidate well positioned to run for president in 2014. But a presidential election wasn't held that year. His decision to leave the 2016 race on Wednesday was a bow to the inevitable: The party had evolved and slipped away from him.