A Miami-Dade man was arrested after he shot at his neighbor and opened fire on his home, authorities said.

Cody Richter, 29, was arrested Sunday on charges of attempted murder and shooting or throwing a deadly missile, Miami-Dade jail records showed.

The alleged incident happened in the 34700 block of Southwest 187th Court.

According to an arrest report, Richter was standing in front of his home and shot in the direction of his neighbor’s home, with a bullet entering and going into the bathroom.

The two victims, a man and a woman, were inside the home, heard a loud bang and went to see what it was.

The woman said she saw Richter walking towards her with a gun in his hand and saw her shoot twice at the male victim, who later said he “was able to feel the bullets whizzing by him,” the report said.

Miami-Dade Sheriff’s deputies responded and found Richter holding the gun in front of his home, and he dropped it and was taken into custody, the report said.

Richter told an investigator he was shooting at someone to the right of his neighbor who he claimed was harassing him, the report said.

He was booked into jail and was being held without bond Monday, records showed.