PHILADELPHIA -- A female employee who had just been suspended from her job and escorted from a Kraft Foods Inc. facility returned with a handgun and opened fire Thursday, killing two people and critically injuring a third before being taken into custody about an hour later, police said.

The shooting happened in the city's northeast section shortly after 8:30 p.m. inside a plant of the nation's largest food manufacturer, whose products include Oreo cookies, Philadelphia cream cheese and Oscar Mayer bacon, Lt. Frank Vanore said.

The woman returned to the building in a car 10 minutes after being escorted out and drove through a security barrier before re-entering the building on foot, Vanore said.

As she walked inside, she fired a shot at an employee who had followed her in and had yelled, "Hide, she's got a gun," Vanore said. That shot missed.

The woman then shot the three victims, said police, who didn't immediately know the victims' identities or whether they had been targeted. Officers responded and isolated the shooter in a room, and she fired a shot at them but missed, Vanore said.

Officers freed seven people who were "in a bad position" near the woman and were hiding, Vanore said, but he wouldn't refer to them as hostages. The shooter eventually was apprehended around 9:30 p.m., he said.

Television footage showed workers leaving the Northfield, Ill.-based company's plant, which used to be known as the Nabisco factory. Police surrounded the plant minutes after the shooting, and roads in the area were detoured as officers swarmed nearby.

Dough mixer Andy Ryan, who has worked at the plant for nearly 30 years, said he was on the third floor when the sound of the shots echoed through the building.

"I heard the gunfire, and I ran," he told The Associated Press, his apron still on. "As I was running down the steps they were yelling, 'Oh, my God, there's three people shot!"'

The Philadelphia Inquirer newspaper reported that about 100 people were inside the plant but had been cleared out.

Several telephone calls and e-mails to Kraft on Thursday night weren't immediately returned.

The identity of the suspended worker wasn't immediately released.

The shooting came just weeks after a driver who had been accused of stealing from a Manchester, Conn., beer distributorship shot and killed eight people and then himself.

The driver, Omar Thornton, had calmly agreed to quit Aug. 3 after being confronted with surveillance video showing him stealing beer. But shortly afterward, he started shooting.

Thornton, who was black, had seethed with a sense of racial injustice in his job at Hartford Distributors, said his girlfriend, Kristi Hannah. Thornton said as much in a chilling call to police dispatchers.

"This place is a racist place," he said in the call. "They're treating me bad over here. And treat all other black employees bad over here, too. So I took it to my own hands and handled the problem. I wish I could have got more of the people."

Hartford Distributors president Ross Hollander said there was no record to support claims of "racial insensitivity" made through the company's anti-harassment policy, the union grievance process or state and federal agencies. Relatives of the victims also rejected the claims.

Click here for more on this story from MyFoxPhilly.com.

The Associated Press contributed to this report.