ALBANY, N.Y. — Regulators in New York have fined Nationstar Mortgage $5 million for violations of the state’s banking rules.

State Department of Financial Services Superintendent Maria Vullo announced the action Wednesday.

In addition to the fine, the Dallas-based mortgage servicing company has agreed to donate $5 million in property and mortgages to local nonprofit organizations working to rehabilitate abandoned properties.

Investigators say Nationstar failed to maintain proper mortgage documentation and didn’t file required paperwork with the state.

They also say the company caused big headaches for homebuyers by failing to fund hundreds of mortgages on time. Officials say many of the problems stemmed from the company’s failure to properly prepare for rapid growth in recent years.

In a statement, the company apologized to its New York customers.