Within the past 18 months, companies rushed to set up shop at the doorstep of the National Security Agency at Fort Meade when the secretive intelligence gathering organization started dangling cash in front of government contractors selling cutting-edge technologies.

The stampede to Fort Meade created an office space crunch in that area of Anne Arundel County and an unexpected opportunity for neighboring Howard County.

To make room for companies doing business with the NSA, landlords nudged tenants without ties to the agency to relocate to Columbia.

Corporate Office Properties Trust, a real estate investment trust, recently helped five firms, including Ameritrade, move out of an office park the trust owns near the NSA at Annapolis Junction to properties it owns in Columbia, said Randall M. Griffin, the trust's president and chief operating officer. Two other firms asked the trust not to make their names public, and another two have signed leases that have not yet been announced.

At least one other firm, Boeing Co., expanded into Howard when it outgrew its space in the trust's Anne Arundel park, known as National Business Park, Griffin said.

"A lot of our buildings are secured buildings with secured communications," Griffin said. "If you're not in the intelligence and defense business, you could just as easily have your business elsewhere."

Richard W. Story, chief executive of the Howard County Economic Development Authority, said real estate developers and building owners in Anne Arundel are "auditing" their leases to find out which of their tenants are defense contractors.

"If a tenant is not connected to the homeland security growth phenomenon, they make a good deal for them in Columbia, and it's a win for everyone," Story said.

But Columbia attracts companies on its own merit, Story said. For example, Motorola Inc. moved its regional offices from Hanover to the third floor of the Micros Systems building in Columbia Gateway this summer to be near the NSA, one of its larger customers, he said.

"Proximity is important, and Columbia is the next ring out" from the NSA, Story said.

Kurt Halvorson, chief administrative officer of Ameritrade Holding Corp., said his online brokerage firm did get some incentives when it agreed to move from National Business Park to a smaller office in Columbia Gateway.

"But the incentives were not material to the deal," Halvorson said. Ameritrade was looking for a smaller office space anyway in an area with restaurants, dry cleaning services and other amenities in demand by its employees, he said.

Corporate Office Properties Trust "was very up front with us," Halvorson said. "They said that after 9/11 there was increased demand for security and defense work in the area. . . . It afforded us an opportunity to meet our business needs and afforded the landlord the opportunity to meet NSA's needs as well."

Until the 1990s, the NSA developed its own technologies in-house. But in its quest to keep pace with the latest in encryption and code-breaking technologies, the agency began reaching out to contractors in 1999 and even more so this year.

An NSA spokesman said the agency will have awarded $2 billion in contracts in Maryland during the fiscal year that ends this month. The NSA expects that number to keep increasing until 2011.