In a case of mistaken identity, a Ventura resident was battered by two men and falsely accused of having an affair with the wife of one of his attackers, police said.

Police arrested two men accused in the attack, which was reported at about 8:30 p.m.

Police said a man was walking from his garage to front door of his home in the 100 block of Carr Drive when two men approached and asked his name. The man replied and the two attacked him, punching him in the face, police reported.

As the attack continued, all three ended up inside the house, police said. The victim asked why they were attacking him and one of the men accused the victim of having an affair with his wife, police said.

In fear for her husband’s safety, the victim’s wife retrieved a handgun and fired two rounds, police said. Neither of the attackers was struck and both fled in a pickup, police said.

As they were driving away, the victim called 911, and a police located the pickup and stopped it, detaining the two men who were inside it, authorities said.

An investigation revealed that the men conspired to commit battery on the victim but during the incident, they discovered the victim was not their intended target and that they had misidentified him, police said.

Police said they arrested Joseph French, 40, and James Solis, 49, both of Ventura, and booked them into county jail on suspicion of conspiracy and battery.