Former Starbucks CEO Howard Schultz, who is contemplating mounting an independent bid for the presidency in 2020, apologized on Thursday for saying he probably had served more time in the military than any of the candidates who've entered the race, admitting he was simply "wrong."

The flap again put Schultz, a billionaire with no prior political experience, on the defensive. Democrats have spent weeks attacking Schultz and openly worrying that an independent run would split their base and hand the White House back to President Trump.

Two Democratic candidates are veterans: Rep. Tulsi Gabbard of Hawaii and South Bend, Indiana, Mayor Pete Buttigieg. Gabbard served in Iraq with the Hawaii Army National Guard from 2004 to 2005, and Buttigieg is a veteran of the Afghanistan War, having served a tour with the Navy Reserve as an intelligence officer.

Schultz made the comments during an interview Thursday with conservative radio host Hugh Hewitt.

SCHULTZ: DEMS WOULD BE PICKING A 'SPOILER' IF THEY NOMINATE A SOCIALIST

“Do you consider yourself competent to run the American military?” Hewitt asked.

“Yes, I do,” Schultz replied. “I probably have spent more time – in the last decade, certainly – than anyone running for president, with the military. I’ve been to Okinawa. I’ve been to Kuwait. I’ve – with Marines, with the Army. I’ve been to the national training center in Mojave Desert.”

Schultz also pointed out that he has "great friends" in the military, including retired Gen. Stanley McChrystal and William McRaven, the retired admiral who oversaw the bin Laden raid in Pakistan.

Soon after Schultz's comments aired, Buttigieg tweeted he didn't "recall seeing any Starbucks" in Afghanistan, where he deployed in 2013.

“I remember a Green Beans Coffee at the exchange at Bagram, and a decent espresso machine run by the Italian NATO element at ISAF HQ," Buttigieg wrote. "But I don’t recall seeing any Starbucks over there . . .”

Afterward, Schultz tweeted that leaders must accept responsibility for mistakes and his comment "was wrong."

"I apologize to @PeteButtigieg and @TulsiGabbard who served our country honorably,” Schultz wrote on Twitter. “In that moment I made something that should unite us all, about me. I made a mistake and I apologize.”

CLICK HERE TO GET THE FOX NEWS APP

A flood of mocking posts quickly appeared on social media. But earlier in the week, Schultz indicated that he was well aware his campaign would face harsh critics and unknown future headwinds -- and said the struggle was worth the cost anyway.

"I refuse to be deterred by the naysayers," Schultz said, "because I love this country and because so much is at stake."

The Associated Press contributed to this report.