ISTANBUL, AUG. 2 -- The initial meeting between an Iraqi official and an Iranian at an out-of-the-way luxury hotel along the Bosporus earlier this week hardly drew any notice in this exotic crossroad city between Europe and Asia.

Istanbul, the ancient Constantinople, has long been infamous as a center for illicit commerce and intrigue between implausible agents and governments in this volatile corner of the world.

But as soon as Ehnan Fadil, the Iraqi, and Mohammed Hassan Mansouri, the Iranian, left the Tarabya Hotel to meet another Iraqi in a rented villa in the suburb of Levent, the meeting turned into a microcosm of the turmoil between Turkey's two warring neighbors that this nation is determined to avoid.

As police here reconstruct events, unknown gunmen surprised the three men in the villa, spraying them with machinegun fire. Mansouri, the Iranian, was killed instantly; Fadil, the Iraqi, was seriously wounded and the other, unknown Iraqi disappeared and, according to western diplomats, is hiding in the Iraqi Embassy in Ankara.

That Iraqis and an Iranian met in an apparent "safe house" to transact a business or intelligence exchange connected with the war in the Persian Gulf -- as police and intelligence officials here privately surmise -- was not that surprising.

What was odd was the subsequent silence of the Turkish government about an Iraqi government official being gunned down in its most famous city. The Turkish government refused to be drawn into the dispute and would not comment about the incident.

Since the beginning of the Persian Gulf war between Iran and Iraq in 1980, Turkey has sought to walk a tightrope of neutrality between its two warring neighboring states, seeking friendship and business with both while having little sympathy or fondness for either.

"Our motto is that we like to keep friendly relations with all our neighbors," explained Adnan Kahveci, the principal adviser to Prime Minister Turgut Ozal. "We also know that our neighbors are there to stay so we must get along with them."

It has not been easy. While the war has brought some new business and trade opportunities as a result of Turkey's strategic position as a land bridge to Europe for both Iraq and Iran, it has also brought internal social and political conflict to Turkey.

Not only has the arming of Kurds by both Iraq and Iran just across their mountainous borders nurtured a revived Kurdish guerrilla movement here, but Iran's radical Shiites have also fomented an Islamic fundamentalist revival among the young in universities and urban centers of this officially secular republic.

"With neighbors like ours," said a senior Turkish official in Ankara who asked not to be named, "who needs enemies?"

Because Iraq has needed to curry favor with Anakara in order to build two vital oil pipelines across Turkey to assure its ability to sell oil after the closing of its traditional gulf outlets south of Basra, Turkey's relations with Baghdad have been correct, if not particularly warm.

Weakened by the seven-year-old war with Iran, Iraq has even given Turkey the right to pursue Kurdish guerrillas operating out of northern Iraq, a right Turkey has exercised three times since 1983 -- to the anger of Iran whose Kurdish irregulars were hit in the Turkish raids.

Of the two neighbors, Turkey has had the most problems with Iran. Though Iran has need of Turkish roads for goods from Europe, it has not let that dampen its traditional reserve toward the Turks nor curbed its efforts to export its brand of revolutionary Islam into a country that -- for all its official secularism -- is 98 percent Moslem.

Iran's Shiite rulers have repeatedly attacked Turkish secularism and the republic's much revered founder, the late Mustafa Kemal Ataturk, who secularized the country in the 1920s.

When in June Iranian Prime Minister Hossein Mousavi paid a state visit to Turkey, ostensibly to try to ease tensions between the two nations caused by Turkish attacks on Iran's Kurdish bases in Iraq, he ended up heaping more abuse, and embarrassment, on his host.

Mousavi refused to pay homage at the tomb of Ataturk -- a ritual visiting foreign dignitaries routinely perform -- and instead went off to visit the central Anatolian city of Konya, the center of Islamic fundamentalism in Turkey.

Though the Turkish press had a field day denouncing the snub, the government, as usual, played down the incident. Instead of complaining about Mousavi's behavior, Ozal's government emphasized that Turkey and Iran had signed a new trade agreement that promised to raise trade between the two nations to $2 billion in the coming year.

The economics of relations with Iran and Iraq are often cited as the reason that Turkey bends over backward to be a good neighbor. That factor, however, meant more in the early days of the gulf war when both Iran and Iraq had foreign exchange to buy Turkish goods, mainly agricultural products and steel.

"In 1984 we were selling Iraq about $150 million in apples alone," said Turkey's Kahveci, referring to the last year when Iraqi President Saddam Hussein could afford a "guns and butter" policy at home. "Then we lost it. Every day they decide to eat something less and we lose.

"They hardly have any cash left. The only cash they have they use for weapons, and even that is drying up," Kahveci said.

What Turkey has not lost yet is the estimated $250 million a year in transit fees paid by Iraq to move its oil through pipelines to the Mediterranean. Those fees will increase substantially this year since Turkey opened its second pipeline across the country early last week, raising its crude oil pumping capacity by 50 percent to a total of 1.5 million barrels a day.

Despite such benefits, the war these days is clearly not a boon to the Turkish economy. "Sure they get some benefits from the war," said one senior western diplomat in Ankara last week. "But they would do even better in peacetime, especially if they succeeded as they probably would in getting a large piece of the reconstruction pie that would follow an end to the war."

Kahveci claims that the only way Turkey could benefit from the war was if it was selling arms. "Our problem," he said jokingly, "is that we don't have a Col. North doing that. We took a decision not to sell arms to our neighbors and we aren't."

Kahveci claims the war, in fact, is costing Turkey from $10 to $30 billion a year in lost exports and building contracts that the country's extremely competitive construction companies could gain in both Iraq and Iran.

It is for that reason, Turkish government officials insist, that Turkey has repeatedly offered itself as a mediator between Iran and Iraq -- with no great success.

In the meantime, the Turkish government plans to continue to maintain a strict neutrality, even when provoked by spillovers of the war such as occurred in Istanbul last week.

"There's nothing to be gained by us in taking sides or making a fuss," said one senior Turkish Foreign Ministry official. "We live in a very volatile area and we have to live with our neighbors as best we can no matter what. Even when the war ends they will be there for us to deal with."