A burglar was shot in Southern Maryland over the weekend in a struggle with a homeowner, authorities said.

The intruder was not seriously wounded in the incident, which occurred before dawn Sunday in St. Mary’s County, according to the county bureau of criminal investigations.

The bureau said in a statement that a burglar entered a private house in the St. Inigoes area through a window while the homeowner was sleeping.

The owner woke up, got a handgun and confronted the burglar in a hallway, the bureau said.

A struggle broke out and the gun went off accidentally, according to the statement.

The struggle moved to the front porch, the bureau said, where the intruder “received a single gunshot wound to the foot.”

The burglar fled, and authorities were called just before 5 a.m. Searchers found a man lying in woods near the house. Authorities said he had a wound that was not life-threatening and was extremely intoxicated. He was treated at a hospital and released.

The criminal investigations bureau, made up of detectives from the sheriff’s office and the state police, said George B. Williams, 19, of St. Mary’s City was charged with burglary and assault.