The logos of Facebook and Giphy.The logos of Facebook and Giphy.

Meta admitted defeat Tuesday after the U.K. competition regulators ordered it to sell Giphy.

Meta must sell GIPHY to a suitable buyer due to the risk of a substantial lessening of competition in the social media and display advertising market. Giphy is up for sale, but it is not clear who will buy it.

The company was not happy with the decision but accepted the ruling as the final word on the matter.

The Meta spokesman told CNBC that they would work closely with theCMA on the issue. We wish the GIPHY team the best of luck. We will continue to look for opportunities to bring innovation and choice to more people.

The combination of Giphy and Meta raised competition concerns and Meta was ordered to sell Giphy to another company. The decision was appealed by Meta. The final decision over the fate of the deal was thrown out by a court in June.

The $400 million acquisition of Giphy by Meta was not a big deal. It spent much more money on earlier deals, including the $1 billion acquisition of photo-sharing appInstagram.

Giphy tried to downplay the significance of Meta's takeover of the company with an odd argument, that its core product offering was going out of fashion, so there wouldn't be any other company willing to buy it.

The company said that GIFs have fallen out of fashion as a content form. Giphy said it has seen a decline in the number of uploads.

The takeover would affect the U.K. display advertising market. Half of the U.K.'s display advertising market is controlled by Meta.

Giphy was considering expanding to other countries, including the UK, before the merger, according to the regulators. It said that such services would have allowed brands to promote their brands through Gifs.

Giphy may give up its ambitions in digital advertising in the decision to block the deal. After the takeover, Meta stopped Giphy from launching its own ads. Giphy was removed as a potential competitor in the UK display advertising market.

This is the first time a global regulator has unwound a completed deal. The battle to rein in Big Tech companies is being fought by the CMA.

The European Commission, the EU's executive arm, has several ongoing investigations into the likes of Meta, Google and Apple, and wants the government to have the power to impose bigger fines on tech giants.