A Fairfax County police detective was killed and two officers were wounded yesterday afternoon after a gunman opened fire with high-powered weapons in the parking lot of a police station during a shift change, law enforcement officials said.

The gunman, who was awaiting trial on carjacking charges in Montgomery County, was killed during the ensuing shootout with police, the officials said.

Police and county officials identified the slain officer as Detective Vicky O. Armel, 40, a nine-year veteran who was assigned to the Sully District station in Chantilly in western Fairfax where the shooting occurred. Her husband is also a Fairfax detective. The couple has two elementary school-aged children, neighbors said.

It was the first fatal shooting of a Fairfax officer in the line of duty in the department's history.

One of the wounded officers was in critical condition last night, police said. The other was being treated for minor injuries and will be fine, said Mary Ann Jennings, a police spokeswoman. A civilian suffered a minor laceration during the gunfight.

Scores of police officers and relatives of the slain and injured went to Inova Fairfax Hospital, where Armel and the critically wounded officer were taken.

"My 1,320 officers, civilian officers and volunteers are grieving," a shaken Police Chief David M. Rohrer said. "We are supporting the family of the officer who is severely injured and the family of the officer who was killed in the line of duty."

Sources said the gunman was 18-year-old Michael W. Kennedy of Centreville, who was arrested April 18 by Fairfax police serving a warrant for Montgomery. He had been released from the Montgomery jail about two weeks ago after posting a $33,000 bond, court records show.

Police Capt. Amy Lubas said the three officers were in the parking lot of the station when the shooting occurred about 3:30 p.m. At least one of the wounded officers returned fire, she said. Rohrer said he did not know whether the gunman was killed by police or took his own life.

Jennings said the incident began when a man with several weapons approached a stranger in a pickup in a nearby subdivision. The stranger managed to flee with his keys. The man then hijacked a van at gunpoint. That driver also escaped uninjured. The man drove the van to the Sully station parking lot, got out and apparently crouched between two vehicles. He had one rifle, two handguns and no identification.

"All information points to the act of a lone, troubled individual -- not a conspiracy, not an act of terrorism," said Gerald E. Connolly (D), chairman of the Fairfax County Board of Supervisors. "It would appear that the gunman specifically targeted the police."

The shooting shut down the busy area near Route 28 in Fairfax's high-tech corridor. Businesses and schools were shuttered for hours as police tried to verify that Kennedy had acted alone. Helicopters hovered overhead, schools were locked down and traffic came to a halt.

"This is crazy," said Laurie O'Bryan, who lives near the station. "It's just insane. Nothing like this has ever happened in Fairfax. You'd think this is a safe neighborhood because it's so close to the police station."

Donald Lawson, a network engineer at a Chantilly business, was driving past the Sully station on his way home from work about 3:40 p.m. when he heard gunshots and something hit his front passenger door, he said. His engine shut off. As he tried to restart it, he heard another round of shots, and his passenger side window was hit.

"I hid behind my car. . . . Cops were flying around everywhere," he said. "I kind of felt safe behind my truck." After a few minutes, an officer came over to him, helped him into a police car and drove him to a corner. He was treated for a cut on his face and called his wife. "The Fairfax County police were very professional; they were very calm," he said. Police kept his sport-utility vehicle, a Ford Explorer, for tests.

Armel's neighbors in Rappahannock County, Va., described her as fun and bubbly and devoted to her family and church.

Tammy Kerr, who lives across the street, said she often baby-sits Armel's children. "Vicky would call us and say, 'I'm on a stakeout. Can you come watch the kids?' " Kerr said. "Vicky wasn't afraid of anything."

Kerr said Armel and her husband -- when they were explaining their jobs to the kids -- would say, "We're going to get the bad guys."

She described Armel as an all-around mom: "I really admired her. She was a woman who worked hard and loved her kids. I adored her. I would have given her mother-of-the-year awards every day."

Armel often would celebrate with "French Fridays" -- taking her children to McDonald's and treating them to french fries. Neighbor Stephanie Loos said Armel painted murals in each of her children's rooms -- a safari theme for her son and mermaids for her daughter.

Kerr said Armel's husband also is involved with the children. "He'll be able to step up to the plate, if anyone can," she said.

The Rev. Mark DeCourcey, associate pastor at Mountain View Community Church in Culpeper, Va., said Armel was "a tireless laborer" at the church, where she was in a pastoral care group. He said she did a great deal of the thankless behind-the-scenes and administrative work in the church, which meets at Culpeper County High School.

The pastoral care group performed Bible study and outreach, which meant relationship building and inviting people to attend services.

Kennedy, the shooter, was charged with carjacking April 18 in Rockville. Montgomery police said a 33-year-old Germantown man was driving out of a parking lot in the 9900 block of Blackwell Road when he stopped his vehicle to let Kennedy walk in front. Kennedy approached the car on the driver's side and, implying he had a gun, told the man to get out.

The victim was allowed to get his belongings from his Toyota 4Runner before Kennedy sped away, police said. About 10:30 that night, Fairfax police called their counterparts in Montgomery to tell them that Kennedy had gone to a police station in Fairfax to turn himself in. It was unclear whether that was the Sully District station.

Kennedy was taken into custody in Fairfax and later transported to Montgomery, where he was charged with carjacking, armed carjacking and theft of more than $500. He was released April 22 after posting the bond.

His neighbors in Centreville said Kennedy always wore black, military-style clothes and army boots, even in the summer. They said he never explained why.

"It's not really a big surprise," said Katie Palmer, who graduated last year from Westfield High School with Kennedy. "He brought a knife to school once." Other neighbors said Kennedy was into paintball.

Palmer and others described Kennedy as standoffish, "in his own world."

She said that he was "really, really smart" and that he would help her with math, science and biology homework. Classmates said he didn't appear to have many friends.

Palmer said Kennedy often was hassled by security at the school because of the way he dressed.

Neighbor Sergio Gutierrez, 17, said that Kennedy often was seen walking around in a heavy army coat and that "he didn't say nothing to nobody."

They didn't know what Kennedy had done in the year since graduation. Holly Messinger, assistant principal at Westfield High, confirmed that Kennedy had graduated from the school but declined to comment about him as a student.

Two law enforcement sources, speaking on condition of anonymity because the investigation is ongoing, said detectives learned that Kennedy had warned friends that he might attack the police but that none of them had alerted authorities. Details of the threat were not known.

When the $7.5 million Sully District police station opened three years ago, it was Fairfax's first new station in 27 years.

The offices of Michael R. Frey, the supervisor who represents the Sully District, are also in the 32,300-square-foot station, which has community meeting space. Frey has said Fairfax's Area Agency on Aging occupies space in the building for computer classes and senior fitness and nutrition programs. The county recreation department also uses the building.

The Sully magisterial district includes Centreville, Clifton, Chantilly and Oakton, all suburban enclaves not known for violent crime.

Yesterday morning, long before the shooting, about 100 people, including many police officers, attended a memorial service at police headquarters for Fairfax officers killed in traffic accidents. Some of them were from Sully.

Staff writers Karin Brulliard, Michael Alison Chandler, Timothy Dwyer, Maria Glod, Ernesto Londoño, Alec MacGillis, Candace Rondeaux, Ian Shapira, Theresa Vargas and Martin Weil and staff researcher Bobbye Pratt contributed to this report.