A man was shot and injured at a Dripping Springs hotel Sunday morning when a bullet came through the wall from an adjoining room, the Hays County sheriff’s office said.

William Frame, 54, of New Braunfels was charged with aggravated assault with a deadly weapon after the shooting, authorities said.

The sheriff’s office said that shortly before 9 a.m., a caller reported hearing a gunshot from one of the rooms at the Outpost Hotel on Ranch Road 12 in Dripping Springs. When deputies arrived, they discovered a 35-year-old man with a gunshot wound to the leg, officials said. An investigation determined that the bullet had come through the wall from an adjoining room, authorities said.

Officials discovered who had rented the room next door. Frame was apprehended Sunday walking down Ranch Road 12 with a handgun, authorities said. He is being held at the Hays County Jail.