A former top cop in Connecticut pleaded guilty Monday to criminal charges accusing him of rigging the search process to become the police chief over other candidates and lying about it.

Armando “A.J.” Perez, 64, admitted Monday to conspiring in a criminal scheme to become the permanent police chief in Bridgeport in 2018 as part of a plea deal with federal prosecutors.

He pleaded guilty in Bridgeport Federal Court to conspiracy to commit wire fraud and to lying to the FBI in exchange for a sentence of 18 to 24 months in prison.

CONNECTICUT POLICE CHIEF RESIGNS, FACES FEDERAL CHARGES OF RIGGING HIS HIRING

His accused accomplice, 73-year-old David Dunn, Bridgeport’s former acting personnel director, also pleaded guilty to the same charges. Dunn also faces 18 to 24 months in prison.

Former Bridgeport Police Chief Armando “A.J.” Perez, 64

Former Bridgeport Police Chief Armando “A.J.” Perez, 64 (Bridgeport Police Department )

Both have January 2021 sentencing dates.

“As they have now admitted, former Chief Perez and former Personnel Director Dunn schemed to rig the purportedly impartial and objective search for a permanent police chief to ensure the position was awarded to Perez, and then repeatedly lied to federal agents in order to conceal their conduct,” New York U.S. Attorney Audrey Strauss said.

POLICE CHIEFS WHO HAVE RESIGNED OR RETIRED SINCE GEORGE FLOYD DEATH

“Today’s pleas are a significant step in ensuring that Bridgeport’s citizens and police officers have leaders with integrity who are committed to enforcing, not breaking, the law,” she said.

During the plea elocution, Judge Kari Dooley asked Perez if he had received inside, confidential information about what the examination for police chief would be, the Connecticut Post reported.

He said he did.

“And you enlisted others to prepare both the written and oral examination?” the judge asked, according to the paper.

“Yes, your honor,” he replied.

Before becoming Bridgeport's permanent police chief two years ago, Perez had been serving as the head of city's police department in an acting capacity.

CLICK HERE TO GET THE FOX NEWS APP

He resigned last month after his indictment was announced.

"Two years ago, in an effort to achieve his ultimate goal of becoming the permanent police chief, he turned to fellow officers to help him write his application essay answers and he accepted inside information and help from others during the process that was not appropriate," Perez attorney Robert Frost Jr. said in a statement to Fox News.

"When confronted by investigators, he did not truthfully disclose everything that occurred," he said.

"Today, he has acknowledged that his actions were wrong and he knew them to be wrong at the time," Frost said. "By pleading guilty, A.J. has accepted responsibility for his conduct, and he has agreed to pay full restitution to the city in order to set things right."