The North Face is apologizing for secretly changing photos on Wikipedia pages to promote the brand's products.

The scheme involved The North Face and its ad agency, Leo Burnett Tailor Made, snapping pictures of people donning company gear at popular locations across the world and then planting the photos on the editable Wikipedia pages for the different sites.

The companies did this to take advantage of Google's search algorithms, which tend to rank Wikipedia entries first on the image results. As a result, the pictures containing North Face gear were able reach top billing on Google without paying any cost.

"We hacked the results to reach one of the most difficult places: The top of the world's largest search engine," The North Face boasts in a video about the ad campaign, which you can view on Ad Age.

More From PCmag

The nonprofit foundation that helps runs Wikipedia is not happy with the apparel company. One reason why is because The North Face had originally claimed it collaborated with the encyclopedia site on the ad campaign.

"Wikipedia and the Wikimedia Foundation did not collaborate on this stunt, as The North Face falsely claims," the nonprofit said in a statement on Wednesday. "In fact, what they did was akin to defacing public property, which is a surprising direction from The North Face."

The other problem is that Wikipedia's goal is to provide information free from bias and misinformation. "When The North Face exploits the trust you have in Wikipedia to sell you more clothes, you should be angry," the nonprofit also said. "Adding content that is solely for commercial promotion goes directly against the policies, purpose and mission of Wikipedia to provide neutral, fact-based knowledge to the world."

Wikipedia's volunteers have removed The North Force-created images from the encyclopedia site. In some cases, the photos were left, but the apparel brand's logo was cropped out.

The North Face has apologized for the ad campaign. "Effective immediately, we have ended the campaign and moving forward, we'll commit to ensuring that our teams and vendors are better trained on the site policies," the company said in a tweet.

This article originally appeared on PCMag.com.