The Denver Sheriff Department will pay $10,000 and change its hiring practices after the Justice Department found it broke the law by excluding job candidates who were not U.S. citizens, according to the terms of a settlement agreement announced Monday.

The federal agency's investigation found Colorado's largest sheriff's department illegally required deputy sheriff applicants to be U.S. citizens and posed job ads with citizenship requirements.

The practice went on from Jan. 1, 2015, to March 23, when the troubled department was on a push to hire more deputies as part of a far-reaching reform effort.

The Immigration and Nationality Act's anti-discrimination provision's requires most employers to consider people who are not U.S. citizens, as long as they have a work permit.

Yet the federal law also allows police departments to impose hiring restrictions based on citizenship status as long as they are the result of state law or government mandate, not internal policies.

More than 40 states have rules in place keeping law enforcement agencies from hiring non-citizens. Only Colorado, Louisiana, Maine, Vermont and West Virginia have no such statewide citizenship restrictions, according to an October Justice Department report addressing the subject.

Though permitted in some places, "this requirement may prevent a considerable number of racial and ethnic minorities - many of whom have valuable foreign language skills - from being hired by law enforcement agencies," according to the report on diversifying law enforcement.

The Justice Department has sanctioned other agencies for citizenship requirements.

The Eugene, Oregon, police department agreed in August 2015 to pay fines and retrain its employees after the Justice Department found the city asked police officer applicants about their citizenship status to exclude applicants who were not U.S. citizens.

And the Justice Department began monitoring the hiring practices of the Arapahoe County sheriff's office in suburban Denver in 2013, after an investigation showed it improperly restricted jobs to citizens, when no law allowed it.

Denver sheriff spokesman Simon Crittle said the roughly 890-member department did not know it had broken the law.

"While we didn't commit this violation intentionally, we accept responsibility and are taking steps to clarify policy and amend language in hiring documents," Crittle said.

Sheriff's officials must now reconsider disqualified candidates without regard to their citizenship, according to the settlement agreement. The department will also re-train staff and revise its policies to adhere to federal law.

Vanita Gupta, head of the Justice Department's Civil Rights Division, said in a statement that eliminating the unlawful citizenship requirement will ensure the sheriff department hires the most qualified applicants.