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.

NEW YORK (CNN) — Everyone hates paying bank fees. But imagine paying fees on a ghost account you didn’t even sign up for.

That’s exactly what happened to Wells Fargo customers nationwide.

On Thursday, federal regulators said 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.

“Wells Fargo employees secretly opened unauthorized accounts to hit sales targets and receive bonuses,” Richard Cordray, director of the Consumer Financial Protection Bureau, said in a statement.

Wells Fargo confirmed to CNNMoney that it had fired 5,300 employees related to the shady behavior.

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 CFPB.

The way it worked was that employees moved funds from customers’ existing accounts into newly-created accounts without their knowledge or consent, regulators say.

Additionally, Wells Fargo employees also submitted applications for 565,443 credit-card accounts without their knowledge or consent, the CFPB said the analysis found.

Wells Fargo is being slapped with the largest penalty since the CFPB was founded in 2011. The bank agreed to pay $185 million in fines, along with $5 million to refund customers.

“We regret and take responsibility for any instances where customers may have received a product that they did not request,” Wells Fargo said in a statement.

Wells Fargo confirmed to CNNMoney that the firings represents about 1% of its workforce.

“At Wells Fargo, when we make mistakes, we are open about it, we take responsibility, and we take action,” the bank said in a memo to employees on Thursday.