This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

Wells Fargo has been hit with a $185 million fine for opening millions of unauthorized accounts in order to meet sales goals. Wells Fargo confirmed to CNNMoney that it had fired 5,300 employees related to the shady behavior.

On Thursday, federal regulators said the Wells Fargo employees secretly created millions of unauthorized bank and credit card accounts — without their customers knowing it — since 2011. The phony accounts earned the bank unwarranted fees and allowed Wells Fargo employees to boost their sales figures and make more money.

The scope of the scandal is shocking. An analysis conducted by a consulting firm hired by Wells Fargo concluded that bank employees opened up 1,534,280 deposit accounts that may not have been authorized, according to the Consumer Financial Protection Bureau.

The way it worked was that employees moved funds from customers’ existing accounts into newly-created accounts without their knowledge or consent, regulators say. Employees also submitted applications for 565,443 credit-card accounts without customers’ knowledge or consent.

The $185 million is the largest penalty since the CFPB was founded in 2011. As part of the agreement with regulators, Wells Fargo will compensate customers who had to pay fees or charges to their accounts. In addition to the $185 million in fines, the bank will pay $5 million in customer refunds.

Former employees say they were pressured to meet sales goals.