This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

WASHINGTON — The Department of Justice announced a settlement Friday with Arizona’s Maricopa County and its sheriff, Joseph Arpaio, also known as “Sheriff Joe,” over a lawsuit that alleged discrimination and the unlawful detention of Hispanics.

The lawsuit, which was filed in May 2013, alleged several unconstitutional behaviors by Arpaio and his staff, including the targeting of Hispanic immigrants during patrols, traffic stops and raids on businesses, detentions that violated Hispanics’ right to privacy and a failure to provide language access to Hispanic inmates who didn’t speak English.

The lawsuit also claimed that the sheriff’s office retaliated against police who were critical of Arpaio.

The settlement includes agreements that will prevent future constitutional violations, said Deputy Assistant Attorney General Mark Kappelhoff of the Justice Department’s Civil Rights Division.

The settlement requires that the sherriff’s office not retaliate against people criticizing Arpaio or the office, and that Spanish-speaking Hispanic inmates are protected from discrimination. It also requires that inmates receive needed medical attention and interpreters.

“The Maricopa County Sheriff’s Office changed many of their practices after the commencement of our litigation, and these agreements ensure that progress continues and the constitutional rights of the people of Maricopa County will be protected for the long term,” Kappelhoff said in a statement.

Attempts to contact Arpaio’s office for comment Friday afternoon were not immediately successful.

Arpaio, who has made national headlines in the past for his uncompromising views against illegal immigration, invited Donald Trump to speak in Phoenix for a campaign rally last weekend that attracted thousands. Trump has attracted controversy for comments he’s made about undocumented immigrants from Mexico, calling some of them “rapists” and “killers.”

Thousands of supporters and protesters attended the event, which had to move locations to accommodate the crowd.