Walmart has apologized for fulfilling a customer's request to bake a cake bearing the flag of the Islamic State militant group, also referred to as ISIS, a terror organization that controls large swaths of territory across Syria and Iraq.

United Press International (UPI) reported that Louisiana resident Chuck Netzhammer decided to test the retailer's policies after a local Walmart store had refused to take an order for a cake bearing the Confederate battle flag with the words "Heritage, not Hate." Netzhammer proceeded to another Walmart and requested the pastry with the black ISIS flag, which was promptly delivered.

The terror organization "is beheading Christians, selling little girls into slavery and is currently a terrorist org at war with the United States - but you can't buy the General Lee toy car?" Netzhammer quipped in an online video, according to Mediaite. "It's a damn shame."

Walmart, for its part, said that the employee who prepared the ISIS cake was not aware of the meaning or symbolism of the flag, which is also known as the "Black Standard" and has a history that goes back to the 8th century.

"The cake should not have been made, and we apologize," a spokesman for Walmart told ABC News.

Walmart's initial refusal to bake Netzhammer's Confederate cake, meanwhile, seems to be in line with an announcement the retailer made last week in the wake of the deadly shooting at a historic black church in Charleston, South Carolina. Walmart had announced it would stop selling all items featuring the Confederate flag.

"We never want to offend anyone with the products that we offer," the company said, according to UPI.

Other large retailers, including Amazon, Sears, eBay and Etsy, quickly followed suit and removed Confederate flag merchandise from their websites.

Kerry McCoy, the owner and president of FlagandBanner.com, however, told the newswire that he saw no reason to stop selling the historic emblem -- or any other flag, for that matter.

"I don't sell the Confederate flag for any specific group; I just sell the flag," he said. "This is America. Everybody has a right to be represented, whether you are a history buff or a nut."