State Attorney General Eric Schneiderman’s investigators heard from customers and former employees that a pattern of racial profiling began last year when the high-end store tried to crack down on a dramatic spike in shoplifting and credit card fraud.

Complainants told Schneiderman’s civil rights division that the store’s security team — known as the “loss prevention unit” — made a habit of keeping watch over black and Hispanic shoppers in disproportionate numbers.

“This agreement will correct a number of wrongs,” said Schneiderman, “both by fixing past policies and by monitoring the actions of Barneys and its employees to make sure that past mistakes are not repeated.”

Trayon Christian, 19, says he was accused of fraud after buying a $349 Ferragano belt at Barneys in April 2013.

In a 27-page settlement document signed by both parties Friday, Schneiderman released a series of findings from a nine-month review based on interviews with nearly a dozen complainants in the so-called shop-and-frisk case, including shoppers and former employees.

They alleged that black and Hispanic customers were unfairly targeted when they entered the pricey store at 660 Madison Ave.

The store’s own data showed that from October 2012 through October 2013, black and Hispanic shoppers were detained “at rates far greater than their percentage of the store’s customer base.”

Customers and former employees told investigators from Schneiderman’s civil rights division that the the security team in the Madison Ave. store unfairly targeted black and Hispanic customers.

The review began this past October in response to a series of Daily News articles exposing numerous complaints about racial profiling at Barneys and Macy’s.

Schneiderman’s review of Macy’s continues, but Barneys executives last week agreed to the settlement.

As part of the deal, Barneys agreed to pay the $525,000 in fines and legal expenses, to hire an “anti-profiling consultant” for two years, to update its detention policy and to improve training of security and sales personnel.

Christian says he was profiled when he tried to buy the Ferragamo belt.

The problems apparently started in March 2013 when Barneys hired a new security executive, the review found. In the ensuing months, door guards “exclusively identified minority customers as warranting surveillance,” complainants told the attorney general.

In-store detectives regularly followed minority customers even after sales associates identified them as frequent patrons of the store, complainants alleged.

Former Barneys employees told Schneiderman the store detectives were regularly pressured to “be more proactive in making stops and getting more ‘cases,’ ” the settlement states.

In April 2013, shortly after the crackdown began, Trayon Christian, a 19-year-old student, said he was followed by NYPD plainclothes cops outside the store and accused of fraud after he bought a $349 Ferragamo belt.

Kayla Phillips, a 21-year-old nursing student, was surrounded in February 2013 by four plainclothes cops who accused her of credit card fraud after she bought a $2,500 orange suede Celine bag.

In both cases, no charges were filed, and both customers filed lawsuits against the store and the NYPD. The suits are pending.

Barneys CEO Mark Lee said in a statement that the company was “pleased” with the settlement.

“During the entirety of our 90-year history, Barneys New York has prided itself on providing an unparalleled customer experience to every person that comes into contact with our brand,” he added. “We (have) absolutely no tolerance for discrimination of any kind.”