Wells Fargo has agreed to spend at least $42 million to settle allegations that it neglected the maintenance and marketing of foreclosed homes in black and Latino neighborhoods across the country, the National Fair Housing Alliance announced Thursday.

A year-long investigation by the advocacy group found that homes serviced by Wells Fargo in minority communities were far more likely than those in white areas to be left in disrepair, with broken windows, unkempt yards or water damage. These home were also less likely to have for-sale signs than ones in predominantly white neighborhoods.

Under the agreement, Wells Fargo, which did not admit any wrongdoing, will provide $27 million to nonprofit groups to promote home ownership, neighborhood stabilization and property rehabilitation in minority communities in 19 metropolitan areas. It will also provide $11.5 million to the Department of Housing and Urban Development to help 25 other cities.