Two homeless men entered an Oregon home and started beating a man with a baseball bat early Wednesday morning, the Coos County Sheriff’s Office said.

Authorities responded to the home just before 3 a.m. to a report of shots fired — but it wasn’t the alleged aggressors who had fired them.

Johnny Moore and Joseph Killingsworth. (Coos County Sheriff's Office via KVAL-TV)

Johnny Moore and Joseph Killingsworth. (Coos County Sheriff’s Office via KVAL-TV)

According to the sheriff’s office, the 23-year-old victim pulled out a shotgun and fired two warning rounds into the air after Joseph E. Killingsworth, 27, and Johnny R. Moore, 25, entered his home and started attacking him, KVAL-TV reported.

The two transients were armed with a baseball bat and several aggressive dogs, the sheriffs office said, adding that the men believed the victim had reported them to the Bureau of Land Management for trespassing.

Both allegedly took turns striking the victim with the baseball bat, causing extensive head, face and back injuries, authorities said, according to KVAL. In an attempt to escape he pulled out his shotgun and fired warning shots into the air.

The two homeless men, terrified, fled the scene and called police to report that they had been fired upon. They were subsequently arrested and charged with assault.

The 23-year-old victim was taken to the hospital for treatment, KVAL reported. His condition was not known.

Follow Oliver Darcy (@oliverdarcy) on Twitter