Through the years, he has been kicked out of the police academy twice and axed by two other departments. His internal affairs file contains more than 40 cases with accusations that include beating up a juvenile, hiding drugs in his patrol car and calling in sick to take a Mexican vacation.

On Monday, he was the rogue-cop-turned-hero.

Digital Access For Only $0.99

The FBI, which is in charge of the bank robbery investigation, declined to comment on the robbery or Bosque’s role in preventing it. A federal law enforcement source said Bosque witnessed the incident, and helped foil it.

Bosque’s actions come three weeks before he is to be sentenced in Miami-Dade Circuit Court after being found guilty of falsely imprisoning a man and witness-tampering.

In 2011, he had the starring role in a Sarasota Herald-Tribune investigation, “Unfit for Duty,” that studied lax internal affairs units in police agencies and the powerful police unions that fight for their members.

Bosque, who was fired by the Opa-locka Police Department before the start of the trial, no longer carries a firearm.

Asked for details about Monday’s bank robbery, Bosque’s attorney, Jackie Arango, was surprised by the news and then set up a conference call with her client.

Bosque said he was seated at the desk of a manager at the TD Bank branch at 16200 NW 57th Ave., Miami Lakes, about 11:20 a.m. when the manager stood up looking “nervous.” There was only one other customer in the bank, Bosque said.

“He robbed us, he robbed us,” Bosque said he heard one of the managers say.

At that point, Bosque said, “I went to [my] truck and called 911. I kept a visual on him. He went across the street to another car. Someone was waiting for him.”

The car left, and Bosque followed it for a few blocks around Miami Lakes. He said that when he was spotted, the guy who apparently robbed the bank and was wearing a hoodie, jumped out of the car near the Costco store at 16580 NW 59th Ave.

Bosque said he continued watching the man until Miami-Dade police arrived and took him into custody. Police then handed the suspect over to federal agents.

No one else confirmed Bosque’s account Monday.

Bosque, 50, is awaiting sentencing from an August 2011 incident in which he was accused of taking matters into his own hands after being called to a domestic-violence dispute.

Called to the scene of a dispute between a man and a woman over their child, he was accused of reaching into the car and trying to rip the baby from the man’s arms while he was inside the car, then punching the man in the face.

When the man showed up at the police station to file a complaint, Bosque allegedly grabbed the man’s cellphone, tossed it across the room, pushed the man up against the wall, then handcuffed him.

The man was eventually released without being arrested. Bosque’s sentencing is scheduled for Nov. 20.

On Monday, he was all about cooperation, happy to give a witness account of the bank robbery to the feds.