But later in the day, police said in a tweet that the man in the tan uniform had been identified and was not involved in the shooting.
It was not immediately clear whether the number of dead included a gunman.
As emergency vehicles and law enforcement officers flooded streets around the complex, a helicopter hovered overhead, nearby schools were locked down and airplanes at nearby Reagan National Airport were grounded so they would not interfere with law-enforcement choppers.
A short distance away, security was beefed up at the Capitol and other federal buildings, but officials said there was no known threat.
Todd Brundidge, an executive assistant with Navy Sea Systems Command, said he and other co-workers encountered a gunman in a long hallway on the third floor. The gunman was wearing all blue, he said.
"He just turned and started firing," Brundidge said.
Terrie Durham, an executive assistant with the same agency, said she also saw the gunman firing toward her and Brundidge.
"He aimed high and missed," she said. "He said nothing. As soon as I realized he was shooting, we just said, 'Get out of the building.'"
Rick Mason, a civilian program-management analyst for the Navy who works on the fourth floor of the building, said a gunman was firing from the overlook in the hallway outside his office.
Shortly after the gunfire, Mason said, someone on an overhead speaker told workers to seek shelter and later to head for the gates at the complex.
Patricia Ward, a logistics-management specialist, said she was in the cafeteria getting breakfast.
"It was three gunshots straight in a row — pop, pop, pop. Three seconds later, it was pop, pop, pop, pop, pop, so it was like about a total of seven gunshots, and we just started running," Ward said.