NEWARK — The green welcome sign hangs in the front door of the downtown branch of Hudson City Savings Bank, New Jersey’s largest savings bank. But for years, federal regulators said, its executives did what they could to keep certain customers out.

They steered clear of black and Hispanic neighborhoods as they opened branches across New York and Connecticut, federal officials said. They focused on marketing mortgages in predominantly white sections of suburban New Jersey and Long Island, not here or in Bridgeport, Conn.

The results were stark. In 2014, Hudson approved 1,886 mortgages in the market that includes New Jersey and sections of New York and Connecticut, federal mortgage data show. Only 25 of those loans went to black borrowers.

Hudson, while denying wrongdoing, agreed last month to pay nearly $33 million to settle a lawsuit filed by the Consumer Financial Protection Bureau and the Justice Department. Federal officials said it was the largest settlement in the history of both departments for redlining, the practice in which banks choke off lending to minority communities.