Updated

The Indiana State Police said Thursday it had let go a trooper who had been sued twice in the past 18 months for allegedly preaching to citizens after stopping them for traffic violations.

Senior Trooper Brian Hamilton, 40, was a 14-year veteran of the agency, Fox 59 reported. His firing was announced two days after the American Civil Liberties Union of Indiana filed suit on behalf of driver Wendy Pyle, who claimed her rights were violated after Hamilton pulled her over in January.

"While all of us — citizen and police officer — enjoy the right to freedom of religion and freedom of speech," State Police Superintendent Doug Carter said in a statement, "there are appropriate and proper restrictions placed on agents of the State related to their actions while engaged in their official duties."

The lawsuit alleged that Hamilton gave Pyle a warning after pulling her over for speeding. Hamilton then asked her what church she went to and whether she was saved. The lawsuit claimed Pyle answered "yes" to both questions because she was uncomfortable and wanted the stop to end.

The lawsuit then claims Hamilton invited Pyle to attend services at his church and gave her directions.

Pyle filed a formal complaint with the Indiana State Police and was later told that Hamilton had placed her on a prayer list at his church, the suit says.

Hamilton had previously been sued following a similar stop in August 2014, during which driver Ellen Bogan accused him of violating her constitutional rights.

Bogan claimed that Hamilton asked her several times about her religious beliefs. He also allegedly gave her a pamphlet from First Baptist Church in Cambridge City, which asks readers to acknowledge being a sinner, and advertised a radio broadcast titled "Policing for Jesus Ministries."

Fox 59 reported that Hamilton was warned in writing after the incident, and was specifically told not to "question others regarding their religious beliefs nor provide religious pamphlets or similar advertisements."

Hamilton told Fox 59 that he was "just following what the Lord told me to do and you can’t change what the Lord tells you to do. So if the Lord tells me to speak about Jesus Christ, I do. And that’s why they fired me so that’s where we’re at."

Indiana State Police said Hamilton had been on desk duty since Jan. 15, when Pyle's initial complaint was filed.

The Associated Press contributed to this report.

Click for more from Fox59.com.