PORTLAND, Ore. (Reuters) - Oregon’s second-largest city has agreed to pay a civil penalty and undergo federal monitoring in a settlement over allegations it violated anti-discrimination law when hiring new police officers, the Justice Department said on Wednesday.

An investigation found that from July 2013 through February 2015 Eugene asked police officer job applicants about their citizenship status, intending to exclude non-U.S. citizens at the time of hire, the Justice Department said.

“Respondent immediately corrected its employment practices and cooperated fully in the investigation,” according to a copy of the settlement agreement.

The behavior violated the U.S. Immigration and Nationality Act of 1965, which bars employers from limiting work to U.S. citizens except where the employer is required to do so by law, regulation, executive order or government contract.

Eugene agreed to pay a $3,000 civil penalty, train its employees about federal anti-discrimination law and submit to monitoring by the Justice Department for the next three years.

In early January 2015, the EPD started a recruiting effort for new police officers. In some of its promotional materials, EPD erroneously wrote that state law required applicants to be citizens at the time of hire. In fact, state law only requires police officers to be citizens within 18 months of hire.

Melinda McLaughlin, a spokeswoman for Eugene police, said in a statement that some of the promotional materials it used beginning in January 2015 for recruiting new officers wrongly said that state law required applicants to be citizens at the time of hire.

“Upon learning the recruitment should have required citizenship within 18 months of hire, as opposed to at the time of hire, (Eugene Police Department) immediately changed its materials and requirement,” McLaughlin said.

“After several months, (the Justice Department) concluded that while EPD had repeatedly advertised an erroneous citizenship requirement, they did not identify anyone who had been harmed,” she said.