Amazon changed the algorithms that power its product-search system to favor products with higher profit margins, The Wall Street Journal reported, citing sources familiar with the situation.

The company adjusted its product-search system late last year so that instead of surfacing products that were bestsellers or the most relevant for consumers, it incorporated new variables meant to boost the prominence of products that delivered higher profit margins.

Some divisions in the company had also pressured search engineers to favor its own "private-label" products, although it's not clear from the report if the changes ended up boosting those products.

Internally, high-level executives in Amazon's retail business and A9, the company's search team, fought over the move. Retail executives believed Amazon should showcase in-house brands, similar to how grocery stores promote their own brands, while employees who worked on the project argued that it wasn't in Amazon customers' best interest to surface its own products first, according to the Journal.

Additionally, Amazon's own lawyers pushed back against the change, saying it could attract further scrutiny from antitrust regulators.

An Amazon spokesperson told CNBC that it did not change search results to include profitability, but acknowledged that long-term profitability is one factor it used when evaluating new search features.

"We have not changed the criteria we use to rank search results to include profitability. When we test any new features, including search features, we look at a number of metrics, including long term profitability, to see how these new features impact the customer experience and our business as any rational store would, but we do not make decisions based on that one metric. Amazon designs its shopping and discovery experience to feature the products customers will want, regardless of whether they are our own brands or products offered by our selling partners," said the spokesperson.

The spokesperson also noted that Amazon's online sales represent less than 1% of global and 4% of U.S. retail sales, and that its private label sales represent only 1% of the total products sold on its site.

The report comes as Amazon faces ongoing antitrust probes from the European Union's competition watchdog, as well as in the U.S. over its marketplace activity. Last week, as part of a broader antitrust inquiry into major tech companies, leaders of the House Judiciary Committee requested documents from Amazon regarding how its own products factor into its search algorithm, as well as what data is made available to sellers on the platform.

The company's shares are down about 2% in mid-day trading.

Read the full report from The Wall Street Journal.