A man was shot early this morning as his roommate struggled with one of three gunmen who burst into their Dorchester County home claiming to be police, authorities said.

Phillip Fitzgerald Adams Jr., 25, was shot in the left arm during the 1:20 a.m. home invasion at The Cedars apartment complex on Cedars Parkway in unincorporated North Charleston, according to the Dorchester County Sheriff's Office. He was taken to Summerville Medical Center for treatment.

According to sheriff's deputies, the incident played out this way:

Resident Courtney Davis, 23, woke in his bedroom to shouts of "North Charleston police" and "show me your hands." When he opened his door, he found three gunmen dressed in black and wearing bandannas. The men forced Davis to the floor and demanded to know who was in the next bedroom.

Adams, who was in the room next door, heard the commotion and a man shouting "Charleston County Sheriff's Office." He looked out his window and saw no law enforcement vehicles, so he hid. But the intruders kicked in his locked door and forced him and Davis downstairs to look for money.

Adams pointed out where some money was located, and the intruder holding him turned to look. That's when Davis grabbed the man's gun, trying to wrestle it away. In the process, the pistol went off, firing a round into Adams' arm.

Adams managed to pick up a stool and strike the gunman in the back of the head, causing the gun to drop. Davis picked up the gun and tried to shoot, but the intruders ran off.

Davis then rushed his roommate to the hospital. Police determined nothing had been taken from the apartment during the break-in.