A man wearing a traditional Middle Eastern tunic told a barista at a Starbucks in Philadelphia his name was "Aziz." The employee wrote "ISIS" on his cups.

Niquel Johnson told NBC News that he was dressed in a thobe — an ankle-length, long sleeve garment — when he ordered three drinks, one for himself and the others for two friends he was with at a nearby store.

When he was asked by a barista for a name for his order, Johnson said he gave his Muslim name, "Aziz."

"Abdul Aziz is the name I normally go by; it means servant of the Almighty," said Johnson, 40, who lives in Philadelphia. "But I shortened it for them. 'Aziz' alone means mighty."

He picked up the drinks but did not notice until about 20 minutes later, after he returned to a bookstore with his friends, that the name on the three cups was the acronym for the Islamic terror group, ISIS.

"I was shocked at first, and then angry because I felt as though we were discriminated against," Johnson said.

Starbucks told NBC News on Saturday that the barista misspelled Johnson's name and that the company believes it was a mistake and not discrimination.

The incident occurred at at a Starbucks on Germantown Avenue in the same city where two black men were handcuffed and arrested by Philadelphia Police for sitting in a Starbucks without ordering. Their arrests in April 2018 prompted outrage and the following month, Starbucks closed 8,000 locations across the country for an afternoon of anti-bias training.

Johnson said his experience on Aug. 25 leads him to believe the racial bias training was ineffective. "You'd think they'd be a bit more sensitive and the training would be better."

A spokesman for Starbucks said it had investigated the incident. "The customer approached and provided the name 'Aziz,'" the spokesman said. "The barista mistakenly spelled it incorrectly."

He also said Starbucks had connected with Johnson and apologized for "this regrettable mistake."

Johnson said he had emailed Starbucks a formal complaint on Monday with his name, phone number and email address enclosed. Describing to the company what happened, he wrote, "I feel as if I was discriminated against and it's hurtful."

Less than an hour after he filed the complaint, Johnson said he received an email from Starbucks customer care that expressed concern.

A copy of the correspondence was provided to NBC News.

"I have arranged for a specialist to follow up with you by phone at the number you provided," the response said. "We will contact you within 1-2 business days."

A couple of days later, a Starbucks district manager called Johnson and said that he had thought the issue had been resolved earlier in the week when someone from the company spoke to a niece of Johnson’s.

Johnson said no one had spoken to his nieces, who are 13.

Asked by NBC News about Johnson's account of the phone call with the manager, the Starbucks spokesman said a woman identifying herself as Johnson's niece had contacted the store and provided details of his experience, so they had no reason to believe she was anyone other than who she said was.

When a manager asked the woman to speak to Johnson directly, she said that would not be necessary, according to the spokesman, which led the manager to believe the matter was resolved.