Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The openly gay Texas pastor who accused Whole Foods Markets of having sold him a cake decorated with an anti-gay slur apologized Monday and said he was dropping his lawsuit against the grocer.

Whole Foods welcomed the apology and said it was dropping its countersuit.

Jordan Brown, pastor of the nondenominational Church of Open Doors in Austin, filed his suit last month after he drew national attention for a photo he shared of the cake, which was decorated with the inscription "LOVE WINS" — followed by an anti-gay epithet — in blue icing.

Austin, Texas, pastor Jordan Brown tweeted this photo of a cake he said he'd ordered at Whole Foods. NBC News has blurred out a section of the cake that contains a gay slur. @PasJordan

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"That's not the cake I ordered, @WholeFoods and I am offended for myself & the entire #LGBT community," Brown tweeted.

Brown's Twitter account was no longer live Monday afternoon.

In response, Whole Foods Market Rocky Mountains/Southwest filed a countersuit seeking $100,000 in damages for what it strongly insisted was a false accusation.

It said the bakery team member who decorated the cake was also "part of the LGBTQ community," and it even posted store video showing Brown, in an orange T-shirt and jeans, routinely paying for the cake at the register, even though the alleged slur should have been easily visible through the box's clear plastic window.

Related: Whole Foods Says It Will Sue Man Who Claimed Cake Had Gay Slur On It

On Monday, Brown released a statement apologizing not only to Whole Foods and the bakery worker, but also to "the LGBT community for diverting attention from real issues," the media, his partner, his family, his church and his attorney, Austin Kaplan.

Kaplan wasn't immediately available for comment Monday afternoon, and an extensive section of his law firm's website that had chronicled the suit, filed last month in Travis County District Court, had been taken down.

"Today I am dismissing my lawsuit against Whole Foods Market," Brown said. The statement didn't explicitly say Brown was personally responsible for having perpetuated a hoax, but it said, "The company did nothing wrong."

Whole Foods said in a statement that it was "very pleased," adding: "Given Mr. Brown's apology and public admission that his story was a complete fabrication, we see no reason to move forward with our counter suit to defend the integrity of our brand and team members."