Former Starbucks CEO Howard Schultz apologized Thursday for suggesting that he had spent more time with the military than any other member of the 2020 presidential field.

Two other candidates, South Bend, Ind., Mayor Pete Buttigieg (D) and Rep. Tulsi Gabbard (D-Hawaii), are military veterans.

“Today I said I spent more time with the military than any candidate running for president. That was wrong,” Schultz said in a tweet Thursday afternoon.

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

Gabbard served in a field medical unit of the Hawaii Army National Guard in a combat zone in Iraq from 2004 to 2005 and was deployed to Kuwait from 2008 to 2009. Buttigieg was commissioned as an intelligence officer in the Navy Reserve in 2009 and deployed to Afghanistan in 2013.

Schultz, who is exploring an independent 2020 bid, had made the claim in an interview Thursday morning with radio host Hugh Hewitt.

“Do you consider yourself competent to run the American military?” asked Hewitt, who is also a Post contributing columnist.

Former Starbucks CEO Howard Schultz said in an interview aired on Jan. 27 that he may run for president as an independent.

“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 went on to name military leaders who he said have become “great friends” of his, including retired Army Gen. Stanley A. McChrystal, the former commander of U.S. forces in Afghanistan, and William H. McRaven, a retired four-star admiral and former Navy SEAL who oversaw the raid that killed Osama bin Laden.

Schultz’s apology Thursday afternoon followed a tweet by Buttigieg in which he shared a link to the former Starbucks CEO’s remarks.

“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. But I don’t recall seeing any Starbucks over there . . .” Buttigieg said in the tweet.

John Wagner contributed to this report.