WASHINGTON — Sen. Lindsey Graham is dropping out of the presidential race, his campaign announced this morning.

Graham, a South Carolina Republican serving his third term, addressed his supporters in a video and an email.

“While we have run a campaign that has made a real difference, I have concluded this is not my time,” Graham said.

Graham’s focus on national security and fighting terrorism was influential in the overall primary debate, but he was not well known outside South Carolina or the Senate. He failed to poll above single digits nationally or in the early voting states.

In a statement Monday on Sidewire, a political news analysis app, Graham said, “While I am not prepared to make an endorsement, I will continue to speak out in support of candidates who share my commitment to defeating ISIL & solving our nation’s most difficult problems.”

Republican Sen. John McCain of Arizona, the 2008 Republican presidential nominee and chairman of the Senate Armed Services Committee, said that with Graham’s announcement,  “Republicans lost our most qualified, thoughtful, fearless and honest presidential candidate, not to mention the candidate with the best (and it seemed sometimes the only) sense of humor.”

“Despite the disadvantages he faced in resources and debate opportunities, Lindsey’s message of serious statesmanship and problem-solving in public affairs, his forthright opposition to policies and attitudes that would endanger our country and reflect poorly on our party, and his genuine decency and humility won him many new admirers,” McCain said in a statement.

Graham stood out in the crowded Republican field by promoting his efforts at compromise with Democrats on issues such as reducing the federal debt and fixing immigration laws.

“This has been a problem solver’s campaign. However the centerpiece of my campaign has been securing our nation,” Graham said in his farewell video. “I got into this race to put forward a plan to win a war we cannot afford to lose and to turn back the tide of isolationism that was rising in our party. I believe we have made enormous progress in this effort.”

Graham, 60, won a third Senate term last year after defeating a big crowd of primary challengers without a runoff. He is frequently mentioned as a potential defense secretary if a Republican wins the White House in 2016.

Although his poll numbers have dropped in the last few weeks, even in his home state, he’s backed by several Republican leaders in South Carolina. If Graham chooses to endorse one of the other remaining candidates, it could sway some votes before South Carolina Republicans go to the polls in February.

“Sen. Graham has an incredibly strong and loyal grassroots network in South Carolina,” said South Carolina Republican Party Chairman Matt Moore. “Given Sen. Graham’s huge primary victory in South Carolina just last year, the Graham network could have a major impact on South Carolina’s presidential primary.”

Florida Sen. Marco Rubio, a GOP presidential contender, issued a statement acknowledging his foreign policy disagreements with Graham but also describing the South Carolina senator as “a defender of a strong national defense as I am.”

Rubio said Graham stood out as “one of the most forceful voices on any of the debate stages about rebuilding our military… And I personally, of course, think Lindsey is a good guy, a very funny guy. We will miss his humor on the campaign trail.”

Graham officially declared his candidacy for the GOP presidential nomination on June 1. He raised enough money to travel to Iowa and New Hampshire, but started losing ground when the national Republican party and sponsors of the televised debates divided the field into front runners and long shots, and he was relegated to the second-tier debates.

Despite several stand-out debate performances, his poll numbers never went up enough to qualify for the prime time events, where he would have relished confrontations with Donald Trump and the rest of the field.

The Democratic National Committee issued a statement noting that the GOP pledged after the 2012 election to reach out to Hispanic voters, but “the one presidential candidate who has consistently favored comprehensive immigration reform just dropped out of the race after attracting virtually no support.”

Monday’s decision allows Graham’s name to be removed from South Carolina’s Feb. 20 presidential ballot.

It also marks Graham’s first political defeat. He has a perfect record at the ballot box — one election to the South Carolina House, five to the U.S. House and three to the U.S. Senate.

Graham’s campaign earned grudging praise from President Obama, who said he disagreed with the senator’s plan to attack the Islamic State but respected his willingness to take a position.

“What’s interesting is that most of the critics have not called for ground forces,” Obama told NPR News in an interview taped last week.  “To his credit, I think Lindsey Graham is one of the few who has been at least honest about suggesting, here is something I would do that the president is not doing — he doesn’t just talk about being louder or sounding tougher in the process.”

Graham retired from the Air Force Reserves this year after 33 years of serving as a military lawyer.

Contributing: David Jackson