The Justice Department said the agreement was an “important step in redressing” what it called a “historic injustice."