Washington CNN  — 

The US Air Force apologized Thursday for its ill-advised attempt to incorporate the viral “Yanny” or “Laurel” meme into a tweet about repelling a Taliban attack in Afghanistan.

In what was clearly a major social media fail, the initial tweet – which was posted by the Air Force’s official account earlier in the day – attempted to put a playful spin on the popular meme currently sweeping the internet by comparing it to the distinctive sound of the 30mm cannons aboard an A-10 Warthog aircraft.

“The Taliban Forces in Farah city #Afghanistan would much rather have heard #Yanny or #Laurel than the deafening #BRRRT they got courtesy of our #A10,” the tweet said.

The tweet has since been deleted and replaced with an apology that said the initial post was “made in poor taste.”

“We apologize for the earlier tweet regarding the A-10. It was made in poor taste and we are addressing it internally. It has since been removed,” the second post said.

Politicians, corporate brands and even the Department of Defense’s official Twitter account have weighed in on the debate centered around a viral audio clip that says either “Yanny” or “Laurel” depending on the listeners interpretation.

But the Air Force’s post incorporating the pop-culture reference sparked criticism from those who said it was inappropriate to mention the meme in a tweet about the thwarted Taliban attack .

When asked about the controversy on Thursday, Pentagon Spokeswoman Dana White said she wasn’t aware of the tweet.

“What is important to understand is that this is the Afghans’ fight. We are working by, with and through these partners. And they are dying to secure their own future and I think that shouldn’t be forgotten in any of this,” she added.

The US military helped Afghan troops repel a major Taliban attack on the Afghan provincial capital Farah on Tuesday and Wednesday that punctured the security perimeter surrounding the city, US and NATO officials told CNN.

The Pentagon said Thursday some US advisers assisted in the fight and coalition airstrikes also took place. US A-10 attack jets also flew overhead but did not conduct any strikes.

It was unclear how close the Taliban came to capturing the city, which would have represented a major blow to the Afghan government.

The insurgents claimed they briefly seized the city center, while the NATO-led coalition said it saw no direct evidence that they ever made it into the city.

Afghan A-29 attack planes and Mi-17 helicopters carried out multiple airstrikes in defense of the city.

US military advisers eventually arrived in the city to assist Afghan military commanders at their headquarters, helping to call in drone strikes that killed some 28 Taliban fighters, Lt. Col. Martin O’Donnell told CNN.

He said US troops also arrived to advise Afghan commando units involved in the counterattack but did not participate in offensive operations.

CNN’s Ryan Browne contributed to this report.