UPDATED 05/25/12 10:00 p.m.

VALPARAISO, Ind. (CBS) –A gunman who held hostages for nearly six hours Friday at a Valparaiso real-estate office fatally shot himself, ending a standoff with police.

Authorities identified the gunman as Roy Ferguson, 48, of Texas, Porter County Coroner Chuck Harris said Friday night. The city in Texas was not yet known.

Harris said Ferguson suffered three gunshot wounds, two to the head and one to the body, and no determination had been made as to which of the wounds was fatal.

“We’re going to wait until the autopsy is conducted to make those determinations,” Harris said.

Ferguson shot himself shortly before 5 p.m. and was transported to Porter Memorial Hospital, Valparaiso Police Chief Mike Brickner told reporters.

“It’s unfortunate the way it ended,” Brickner said. “The main thing is, the officers aren’t hurt and no innocent individuals are hurt as well.”

Earlier, police had swarmed the building where the gunman held hostages. The incident occurred at a Prudential Real Estate office at 2612 N. Calumet Ave. on Friday morning.

As of 4 p.m. all hostages were released, and only the gunman remained inside.

Police received a 911 call from a worker inside about a man with a gun at the building at 10:30 a.m., Valparaiso police Sgt. Mike Grennes told WBBM Newsradio’s Nancy Harty.

At a news conference around 2 p.m., Grennes said there were shots exchanged between the man and police at the beginning of the standoff, but nobody was injured. One woman did suffer a head injury — not gunshot related — and was treated at a local hospital and released.

Grennes says the gunman had been at the office before.

“It’s an issue over the gunman believing somebody inside the building owed him money,” he said.

Standoff victim Carolyn Biesen says the suspect asked an office manager around 10 a.m. if he could speak to a man knew who worked here, and that’s when the trouble began.

“She said, ‘He’s not here.’ And I just heard the guy say, ‘I’m not leaving until he gets here. Call him.’”

The suspect pulled a gun and Biesen locked herself in her office.

“I felt like I was being a rock underneath the desk,” Biesen said Friday evening while relaxing with family. “You know, underneath staying calm. And then I got a text from my son saying, ‘I love you mom and worrying.’ That’s when you know.”

Fewer than 10 people were working when the suspect entered the building.

Hostage negotiators with the FBI have been able make contact with the suspect.

Streets were blocked surrounding the area, and police officers and snipers had guns trained on the building at all sides.

Schools were placed on lockdown in the area, WBBM Newsradio’s John Cody reported.

Contributing: Sun-Times Media Wire