Pete Buttigieg, the mayor of South Bend and a Democratic presidential hopeful, has eight years of military service and a seven-month deployment to Afghanistan under his belt.

So when former Starbucks CEO Howard Schultz, who is exploring a 2020 run for president, said he spent more time with the military than any candidate running for president, the Navy Reserve veteran had a response.

"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 tweeted early Thursday afternoon.

Schultz made the comments Thursday on a radio show hosted by Hugh Hewitt.

"I probably have spent more time in the last decade certainly than anyone running for president with the military,” Schultz said on the program. “I’ve been to Okinawa, I’ve been to Kuwait, I was with Marines, the Army. I’ve been to the National Training Center in the Mojave Desert.”

Real news, brought to you by real Hoosiers.Support our local journalists.

Less than an hour after Buttigieg's tweet, the entrepreneur-turned-politician tweeted a response, saying he was wrong.

"Yesterday I gave a speech on failed political leadership in this country. A point I tried to make is that leaders must take responsibility and own their mistakes. Today I said I spent more time with the military than any candidate running for president. That was wrong," the tweet read.

Schultz tweeted again a minute later, apologizing to Buttigieg and Tulsi Gabbard, a Democratic presidential candidate who served with the Army National Guard in Iraq after 9/11.

"I apologize to @PeteButtigieg and @TulsiGabbard who served our country honorably. In that moment I made something that should unite us all, about me. I made a mistake and I apologize," the tweet read.

Buttigieg launched an exploratory committee in January ahead of a possible formal announcement but has been showing up in nationwide polls as the presidential preference of roughly 1 percent of Democrats.

His fortunes may have turned, however, following a CNN town hall Sunday, during which he called Vice President Mike Pence a “cheerleader of the porn star presidency.”

Immediately after the town hall, Google searches for his name spiked — and his campaign claimed a fundraising bump. He tweeted later in the week that he was at 85 percent of the campaign donor threshold he’d have to reach in order to appear onstage at Democratic debates later this year.

IndyStar editor Chris Rickett and reporters Justin L. Mack and Kaitlin Lange contributed to this report.

Call IndyStar digital producer Ethan May at 317-444-4682 or email him at emay@indystar.com. Follow him on Twitter @EthanMayJ.