One day last November, one of Richard Shadyac's wealthy Arab clients came to Washington with $25 million to spend on a downtown office building.

After an intense search by Shadyac, a real estate lawyer here, the Arab left town, empty-handed. Shadyac says he has a dozen other Arab clients who would buy in Washington tomorrow if they could find the right deal.

That is the story of downtown Washington real estate: it has become one of the most sought after investments in the world.

Eight large buildings have been sold to foreigners in the last four years.

Foreign investors from the Arab world and Western Europe are dangling millions of dollars before the owners of downtown office buildings. But the owners, delighted by high returns and the best investment security in the country, are, for the most part, not selling.

Even when a transaction occurs, it is nearly impossible to document the extent of foreign ownership in urban real estate. Sales are handled by intermediaries sometimes in the name of Caribbean-registered corporations that blur nationalities.

A survey of more than a dozen brokers and lawyers indicates that whatever their national origin, foreign investors are retreating before a perceived threat of Eurocommunism and seeking a refuge for their capital.

In addition, they are reshuffling their investment portfolios, especially those of large pension funds, which have just recently recognized the advantages of American real estate investments.

Moreover, they are taking advantage of the depressed position of the dollar on international money markets by investing in choice American properties.

"The competition is stiff," said Neal Krucoff, a real estate lawyer who recently handled the $12.5 million sale of 1750 K Street NW to a group of Europeans. "I would venture to say that there are as many European investors interested in downtown as there are buildings downtown," Krucoff added.

But with some noteworthy exceptions, downtown property owners are fending off the assault, which is coming not only from abroad, but also from out-of-town American investors, who have recognized the strength and security of the Washington market.

"There's absolutely nothing for sale," said Shadyac, the real estate lawyer who says he represents more than 20 "individuals from the Arab world."

"I must be looking for good investments for 10 to 12 (Arabs)," said Shadyac. "I'm talking solid investors who would buy tomorrow if the right property were on the market. You just can't buy a building in D.C. if you wanted to."

But buildings have been sold and foreign investors have established a significant beachhead in downtown Washington.

Among the major transactions are:

The Highland Towers Hotel at 1914 Connecticut Ave. NW, across from the Washington Hilton, sold in January, reportedly to Middle East investors, through New York businessman Yusuf A. Haroon. A spokesman for Haroon said he is a former Pakistani ambassador to Australia turned American citizen and international investor. D.C. deed and tax records showed a purchase price of $4.8 million.

1750 K Street NW, sold to West European investors last November. The investors operated through a company named Basilea Inc. and paid $7 million of the $12.5 million purchase price in cash.

The Vermont Building at 1100 Vermont Ave. NW, sold to French-speaking European investors in December 1977 for more than $2 million. The seller, lawyer H. Max Ammerman, recalls the day the buyers came to his office: "They were Belgian, I was told. They spoke French. I speak French and we got along just fine, but their accent was definitely Belgian."

The Imperial Building at 1441 L Street NW, sold at the same time as the Vermont Building and also by Ammerman. But the buyers were different. The $5 million transaction was handled through an intermediary. "I don't know if they're Arab," said Ammerman. "I feel that they are. The names sounded Arabic or Middle Eastern (of) the people who signed the papers that had to be signed."

The office building at 16th and K streets NW, a major tenant of which is Trans World Airlines Inc., sold in December for about $6 million to West Europeans operating under the name Sarz Properties, according to the agent handling the transaction.

2555 M Street NW, sold to Dutch pension fund investors in 1977. D.C. deed and tax records show a $3.2 million purchase price.

1211 Connecticut Ave. NW, sold in late 1976 to a French and Belgian investment group. The purchase price was more than $5.8 million, District records show.

And, perhaps the most visible foreign purchase in downtown in recent years was that by the Kuwait Investment Company in 1975. The Kuwaitis paid $22 million for the 12-story, government-leased Columbia Plaza at 2400 Virginia Ave. NW near the State Department.

The man who handled the Kuwaiti sale, Warren K. Montouri, vice president of Shannon & Luchs Co., said, "We are trying to acquire properties for other foreign investors," but "it's become a problem of the availability of property here -- there just aren't many reasons for selling."

One of the reasons downtown building owners don't want to sell is that occupancy rates in Washington -- and therefore investment security -- are among the highest in the country.

"Office building space tends to be a refuge for capital looking for a solid market," said Dustin Cole, marketing manager for the national Building Owners and Managers Association. "The most interesting thing about Washington is that it's probably the most stable market in the country."

Cole said the most current figures from a voluntary survey of the association's membership show of 98 percent occupancy rates in Washington, compared with 94 percent in Houston, 92 percent in Chicago and 95 percent occupancies in San Francisco.

In some cases it is more than security. When the lawyer who sold the Vermont Building first encountered his French-speaking buyers, "These people were impressed by having two buildings that close to the White House. That had never impressed me."

But there are other reasons why downtown property owners are holding on to what they have, according to local brokers.

With high occupancy rates, returns on investment for premium buildings can be as high as 20 percent, though the average yields are about half that.

And to sell means paying capital gains taxes. The tax on a $5 million sale, for instance, can be as high as $1 million.

"Say you sell," said William Savage, president of Savage-Fogarty, a foreign-owned investment firm here. "You got a tax to pay, then what do you do? There's not another building around. What are you going to do that's better than the building you got?"

Exact determination of the level of foreign investment in downtown Washington -- or any other downtown -- is currently unachievable. Congress passed legislation in 1978 requiring foreign owners of farmland to register with the Department of Agriculture, but there is no similar requirement for urban real estate.

"These people are not looking to buy up the world," said Shadyac, the lawyer representing several Arab interests. "They're looking for solid investments with a halfway decent return at this point," he added.

Motivation aside, tracing the ownership of foreign-owned properties can be arduous.

For example, the purchase of the Highland Towers Hotel on Connecticut Avenue NW was officially made by Dianar N.V., a corporation registered in the Netherland Antilles in the Caribbean.

The president of Dianar is Yusuf A. Haroon, who is also president of Development Industrial Corp., a management company based on Fifth Avenue in New York.

"I don't know where the money is coming from," said Milton Quint, the lawyer who represented the hotel's seller. "We were lawyers performing a very narrow function. All my dealings were with Mr. Haroon."

However, Shadyac, who said he was familiar with the transaction, confirmed that Haroon represented Middle Eastern interests in purchasing the hotel: "Without violating any confidences, I guess it might be classified that way."

Haroon could not be reached for comment, but a spokesman, M. Lee Dayton, a former director for hotel development at Pan American World Airways, Inc., said, "There may be some Mideastern" investors involved. "I simply don't know. That's none of my business... and I don't see why it concerns anybody else."

Washington is by no means the only American city feeling the pressure of foreign investors.

In recent years: a West German bank purchased a major downtown skyscraper in Houston; an Iranian bank announced partnership in a proposal to build a major office and shopping complex in downtown New Orleans and a Canadian firm paid $350 million for nine office buildings in New York City.

Just returned from Europe is Washington real estate developer Robert Holland of Holland & Lyons. During his visit, he said it was visibly apparent to him why foreign capital is flowing west:

"Socialism isn't creeping over there, its gobbling. One reason I came back early is because Europe is paralyzed by strikes. In a city like Brussels, the streets are abandoned, they (investors) are discouraged."