Small-time stock traders love to try to make money off news events, so when the London transit bombers were caught on video cameras recently, electronic surveillance stocks got hot.

Suddenly there were spikes in shares of companies such as CompuDyne Corp. of Annapolis, which provides blast-proof windows and electronic perimeter-security gear, and Ipix Corp. of Reston, a financially troubled maker of eye-in-the-ceiling spy cameras.

Internet message boards buzzed about a handful of small companies involved in video surveillance, bomb detectors and other technologies to detect terrorist threats.

But for all their potential, little outfits are not going to be the big moneymakers in electronic surveillance.

The real winners, Washington investors learned last week, will be companies like Lockheed Martin Corp. of Bethesda, which won a $212 million contract to help protect New York City's transit system.

The New York contract will be handled by Lockheed Martin's Transportation and Security Solutions unit, which has 2,200 employees at its Rockville headquarters. Leading a team of half a dozen suppliers, the Lockheed unit will install security systems not only for the New York subways, but also commuter railroads, bridges and tunnels leading into Manhattan.

The system will go way beyond the video cameras, recorders and emergency communications system used in London, a system that Lockheed Martin also helped install.

Previewing the New York system last week, Judy F. Marks, who will become president of the division on Oct. 1, showed off one of the newest innovations: an "intelligent video" system that can spot a suspicious package left behind on a crowded subway platform and automatically call the police.

The system's television cameras regularly scan the throngs shuffling on and off the trains. People and their possessions are there in one video snapshot, gone and replaced by others in the next. But if something remains unmoved, scene after scene, the computers recognize that's unusual and flash an alert.

Such sophisticated technology may seem worthy of a Hollywood thriller to most Americans, but Marks is modest and cautious about the system.

"None of this is bleeding edge," she said. "None of the elements or subsystems are unique or our invention. The value that Lockheed Martin is bringing is integrating all these elements on a fixed schedule, fixed-price basis and providing those protections in a very challenging installation environment."

The environment she's talking about involves dank, dirty, hundred-year-old subway tunnels, populated not only by commuters but by rats, graffiti artists and homeless people. The latter will be evicted as a side benefit of protecting the system from more dangerous intruders.

The trouble with talking to Marks about intrusion detection and protection systems is that so much of it is secret. Remember Tom Cruise dodging laser beams and motion sensors in the movie "Mission Impossible 2"? Is that the kind of cool stuff Lockheed Martin does?

You can almost sense Marks smiling over the phone as she says, "No comment."

Ten days ago, her division announced it had completed "a highly integrated electronic security system" for all the Washington facilities of the super-secret National Security Agency. It would be fascinating to know how the NSA keeps out intruders, but everything about that job is classified, including the cost.

In fact, it's difficult to discern how much electronic security business Lockheed Martin does. Results of the Transportation and Security Solutions unit are reported as part of Lockheed Martin's Electronic Systems division.

That division had second-quarter revenues about comparable to the aeronautics group, best known for making F-16 and F/A-22 fighter jets. Electronic Systems brought in $2.7 billion in revenue compared with $2.9 billion for aeronautics and generated more pre-tax profit -- $295 million vs. $245 million.

Last quarter, Electronic Systems was Lockheed fastest-growing and most profitable division, delivering about $200 million more in revenues than analysts were expecting. The division's profit margin was 10.8 percent of revenues -- almost two full percentage points better than the company's space systems division, which generated a 9 percent margin.

The Electronic Systems division also makes missiles -- Trident, Hellfire, Longbow and others -- and does "systems integration" a familiar occupation for Washington technology companies. Integrators take different pieces of hardware and software and combine them into a package to perform specific tasks, whether producing newspapers, processing income tax returns or protecting transportation systems from terrorists.

Lockheed Martin jumped into anti-terrorism work after 9/11 and has handled jobs like setting up airport security screening checkpoints and border surveillance in the Southwest. To protect New York harbor, it built a system of 13 radars that track every vessel that moves.

The company in April chose Marks to run this high-growth business. She previously headed Lockheed Martin's Distribution Technologies operation, which automated the U.S. Postal Service and Britain's Royal Mail. She is to succeed the retiring president of the division, Don Antonucci.

Describing the New York project as "an incubator," Marks said other urban transit systems, including the Washington area's Metro, soon will be signing up teams of contractors for similar jobs. They are expected to follow the models of New York and London, where Lockheed Martin created a network of 32 command-and-control centers for New Scotland Yard.

If Marks's operation were a stand-alone business with its background and experience, it would be one of the hottest investments in homeland security, a field that has tantalized investors since 9/11.

It's a far bigger factor in the business than CompuDyne, with $67 million in first-half revenue, and a far safer investment than Ipix, the stock of which has gone up 51 percent since the end of June even though the company disclosed questions about its "ability to continue as a going concern" in a recent filing with the Securities and Exchange Commission.

But Lockheed Martin is nothing like a pure play on the fight against domestic terrorism. Security is just one piece of the conglomerate that is the Pentagon's largest contractor and produced revenues of $35.5 billion last year.

There are so many other moving parts -- the aeronautics business is shrinking this year, and there's speculation about future Pentagon cuts in spending on costly weapons systems such as the F/A-22 -- that it's difficult to extrapolate from the success of one division to the success of the stock.

Wall Street analysts lean toward the positive on Lockheed Martin shares. There are 11 companies rating it "buy," 11 rating it "hold" and a single "sell."

Lockheed Martin stock is up 11 percent so far this year and 16 percent from a year ago, closing Friday at $61.76. Counting 97 cents a share in dividends, investors have made almost 18 percent on their stock over the past 12 months.

That's considerably better than the 9 percent total return of the benchmark Standard & Poors 500-stock index over the same period. The booming homeland security business is one of the reasons why.