Updated with information on settlement to victimsNEW YORK ( TheStreet) -- Bank of America ( BAC) will pay $335 million to settle U.S. Department of Justice charges that alleged discriminatory lending practices by its Countrywide Financial unit. The settlement will be the largest residential fair lending settlement in history and will compensate thousands of African-American and Hispanic borrowers who were victims of the alleged discriminatory practice. The Department of Justice alleged that Countrywide discriminated against African-American and Hispanic borrowers in their mortgage lending practices between 2004 and 2008. The allegations predate Bank of America's purchased of Countrywide in 2008. The DOJ has been probing into unfair lending practices by Countrywide and other banks, such as exclusion of borrowers in low-income or minority neighborhoods and pricing discrimination solely based on race or origin. It alleges that Countrywide charged more than 200,000 African-American and Hispanic borrowers higher fees than non-Hispanic white borrowers in both retail and wholesale lending. Countrywide also allegedly steered thousands of African-American and Hispanic borrowers into subprime mortgages when non-Hispanic white borrowers with similar credit profiles received prime loans. Subprime loans carry higher cost terms such as prepayment penalties and adjustable interest rates that jumped suddenly after two or three years, making payments unaffordable. Attorney General Eric Holder stressed in his statement that the borrowers discriminated against were "qualified" for Countrywide mortgage loans according to the bank's criteria and were charged more not because of "borrower risk" but because of their race or origin. "The department's action against Countrywide makes clear that we will not hesitate to hold financial institutions accountable, including one of the nation's largest, for lending discrimination," said Attorney General Eric Holder. "With today's settlement, the federal government will ensure that the more than 200,000 African-American and Hispanic borrowers who were discriminated against by Countrywide will be entitled to compensation." The settlement requires Countrywide to implement policies and practices to prevent discrimination if it returns to the lending business during the next four years. Countrywide currently operates as a subsidiary of Bank of America but does not originate new loans. "We reached this settlement to resolve issues about Countrywide's alleged historic practices that occurred before Bank of America acquired the company. Bank of America's practices are not at issue," Dan Frahm, a Bank of America Spokesperson said in an emailed statement. " We are committed to fair and equal treatment of all our customers, and will continue to focus on doing what's right for our customers, clients and communities. We discontinued Countrywide products and practices that were not in keeping with our commitment and will continue to resolve and put behind us the remaining Countrywide issues," he said. Shares of Bank of America were up 0.8% in the final hour of trading following the news. The proposed settlement provides for an independent administrator to contact and distribute payments of compensation at no cost to borrowers whom the Justice Department identifies as victims of Countrywide's discrimination, according to the DOJ statement. "The department will make a public announcement and post contact information on its website once an administrator is chosen. Borrowers who are eligible for compensation from the settlement will then be contacted by the administrator. Individuals who believe that they may have been victims of lending discrimination by Countrywide and have questions about the settlement may email the department at firstname.lastname@example.org." --Written by Shanthi Bharatwaj in New York >To contact the writer of this article, click here: Shanthi Bharatwaj.