A man surrendered to Denver police early Thursday after firing shots from the fifth-story window of his Capitol Hill apartment.

Police were called to the Gotham apartments at 1196 Grant. St. just before 2 a.m. for reports of a suicidal person.

The man then barricaded himself inside the apartment, police said, touching off a standoff that ended more than four hours later.

Officers did not return fire and no one was hurt. The man, identified as Shaun Michael Tobelmann, 34, surrendered at the urging of police negotiators. He was arrested for investigation of third-degree assault and discharge of a weapon.

Detectives have not determined how many shots he fired, Denver police spokeswoman Raquel Lopez said. Crime scene investigators were still on scene at 7 a.m. gathering shell casings.

The commotion put neighbors on edge. Walter Palmgren and others said they were awakened by the gunfire and called police.

“I thought I was dreaming hearing all that banging,” said Palmgren, who lives below the gunman’s apartment. Its windows were shattered. “It was sporadic when he was shooting, it wasn’t rapid-fire. It’s totally unnerving. That’s not the way you want to wake up.”

Palmgren said he saw a SWAT team assembling around the building.

His neighbor, Jennifer Sutphin, heard the shots and called 911. She hid for hours in her bathroom until police gave her the OK to come out.

“I could still hear the gunfire,” she said.

Neither she nor Palmgren knew the gunman or what set him off.

“Somebody blasting from their window is pretty scary stuff,” said Zac Steinman, who lives across the street. He said a neighbor received a reverse 911 call warning her to stay inside.