Investigators in Wisconsin say a home invasion in which a man was severely beaten and his pregnant wife was repeatedly sexually assaulted stemmed from a mistake.

Madison police say the attack was spurred by a neighbor's girlfriend, who hoped to have him robbed. But the suspects instead stumbled into the wrong home in an affluent Madison neighborhood.

A criminal complaint filed Tuesday says the suspects beat the man who lived there with a handgun and assaulted his wife, who was six months pregnant. Both were hospitalized.

Six people have been charged in the attack. Three men face sexual assault charges, and one is scheduled to appear in court Wednesday.

Two other men are accused of aiding the attack, and the woman has been charged with conspiracy to commit armed robbery.