A Homosassa, Florida man was arrested after posing as a Citrus County deputy and holding a couple at gunpoint during a home invasion.

The Citrus County Sheriff’s Office said 32-year-old Eric William Johnson was driven to a residence on July 19 by Maynard David Selvog, and when they arrived, Johnson got out of the vehicle while carrying an AR-15 style rifle that turned out to be an "Air-Soft" rifle.

After exiting the vehicle, Johnson knocked on the door of a camper and allegedly shouted, "Citrus County Sheriff’s Department."

He told the victims to exit the camper as he pointed the rifle at them, and believing he was a man of the law, they complied.

FLORIDA MURDER TRIAL OF RAPPER YNW MELLY RESULTS IN MISTRIAL AFTER JURY DEADLOCKS

Eric Johnson and Maynard Selvog mugshots

Eric Johnson, left, and Maynard Selvog, right, face charged related to an armed home invasion and robbery in Citrus County, Florida. (Citrus County Sheriffs Office)

Johnson continued to hold the two victims at gunpoint, the sheriff’s office said, and at one point the female victim tried to call 911, though Johnson took the phone away.

As soon as Johnson became distracted, the male victim ran to a nearby home for help and told police he noticed Selvog sitting in the driver’s seat of an SUV that was located near the road.

Johnson chased the man to the nearby home then kicked in the door to gain entry to the home.

FLORIDA MAN FATALLY SHOOTS PREGNANT WOMAN, UNBORN CHILD IN DOUBLE MURDER-SUICIDE: DEPUTIES

The homeowner, the victim and Johnson got into a fight inside the home, police said, and the homeowner was able to disarm Johnson and hit him in the head with the butt of the weapon.

Police car with lights on

A man impersonated a Florida deputy to gain entry into a couple's home then held them hostage at gunpoint, police said. (iStock)

Selvog and Johnson fled the property, but deputies located Selvog at a nearby residence, who disclosed where Johnson was hiding.

Johnson, police said, was hiding in a nearby shed and when deputies located him, he was holding a gun to his head.

After multiple attempts to get Johnson to comply with deputy orders, K-9 Odie was able to apprehend the suspect.

FLORIDA COUPLE ARRESTED FOR HUMAN TRAFFICKING AFTER FORCING WOMEN INTO PROSTITUTION WITH THEIR CHILD AT HOME

Police said when Odie grabbed Johnson, he put the gun under the dog’s chin and pulled the trigger, but it malfunctioned. He attempted to shoot the dog a second time, though the gun malfunctioned again.

Deputies stepped in and apprehended Johnson before transporting him to a nearby hospital where he was treated for injuries.

Johnson has been charged with home invasion robbery while armed, two counts of kidnapping to commit a felony, burglary of a dwelling while armed, aggravated assault on a person older than 65, aggravated assault with a deadly weapon, impersonating law enforcement, battery on a police canine and resisting arrest.

CLICK HERE TO GET THE FOX NEWS APP

Selvog was also arrested and charged with home-invasion robbery while armed and principal in the first degree. He was held on $50,000 bond.

Johnson was held on $201,000 bond and is being held at the Citrus County Detention Center.