Updated

A man carrying a gun and declaring "I am the emperor" was shot and killed Monday outside the offices of Gov. Bill Ritter by a state patrolman, a spokesman said. Ritter was in his office but was not injured.

The unidentified man refused orders to drop his gun, spokesman Evan Dreyer said. Four or five shots were heard, but authorities would not say how many times the patrolman fired.

Click here for a video report from MyFoxColorado.com.

The gunman did not fire his weapon, police spokesman Sonny Jackson said.

Before he was shot by a member of the governor's security detail, the gunman said, "I am the emperor and I'm here to take over state government," Dreyer said.

The shooting occurred about 2 p.m. in a hall outside the governor's offices on the first floor of the Capitol.

Ritter said he was in the office with 10 or 11 people and heard shots, but he would not say how close he was to the gunman. Some of his staff members witnessed the shooting, he said.

Investigators did not know the man's name or his motive, Jackson said. He declined to discuss the gunman's statement but said it was considered threatening.

The gunman had at least two confrontations with the governor's security guards in the moments before the shooting, Jackson said, giving no details. There had been no prior specific threats against the governor, authorities said.

The Capitol has no metal detectors. They are usually installed temporarily during the governor's annual State of the State address in January but then are removed.

State Rep. Edward Casso said he saw the gunman after the shooting and described him as being in his 30s or 40s, dressed in a white shirt and dark slacks.

Casso said a state patrolman told him to evacuate, adding, "I started to panic a little bit. I was just hoping that was the end of it."

Authorities roped off the area where the man was shot, and an ambulance and eight police cars converged on the building's north entrance.

An hour after the shooting, state troopers and police — some carrying automatic weapons — ordered the Capitol evacuated and began a room-by-room search. They did not say whether the search was a precaution or whether they had reason to believe someone else was involved.

Pat Garriott said he was eating in the basement cafeteria when he heard shots.

"We heard a series of loud bangs, about four," he said. "My partner and I looked up and saw a flash of smoke. We figured out it was probably gunshots."

Security agents rushed them into a basement office for safety and kept them there for about 20 minutes, he said.

Metal detectors were installed at the Capitol after the Sept. 11, 2001, terrorist attacks but were removed the following July. It was not immediately clear why.

Security will be stepped up while lawmakers and others discuss any permanent changes, Ritter said.

"We live in a country where there is just that constant tension about security versus openness," the Democrat said.

"We have always said this building is the people's building and the place where we conduct business, and it's the people's business. There are going to be discussions going forward about how we achieve that right balance between security and keeping it open," Ritter said.

Ritter said he was pleased with the level of security he is provided.

Casso, a first-term Democrat, said the Capitol should have metal detectors.

"It's kind of freaky someone could get that close," he said.

Click here for a video report from MyFoxColorado.com.