If the shah of Iran had only allowed Ayatollah Ruhollah Khomeini to grow old in Najaf, the holy city of Iraq, the upheaval that ousted the king of kings and resulted in the takeover of the American embassy last night might have been avoided. That's the observation of former ambassador Martin Herz, director of Georgetown University's new Institute for the Study of Diplomacy.

Herz is not an academic spouting mere theory. It was Herz who, as a junior political counselor in Tehran in 1964, composed a secret, prophetic airgram to the State Department that cast doubt on the strength of the shah's rule.

"The shah is riding a tiger he cannot safely dismount," Herz observed 15 years ago. "Even members of the establishment, while loyal to the shah, are suffering from a profound malaise, from lack of conviction in what they are doing, from doubts whether the regime deserves to endure . . . The stock of the U.S. is not high among literate persons in Tehran . . . The most distressing aspect of the present situation is that concessions made to popular (or, rather, middle-class opposition) pressures, for instance by way of giving leeway for freedom of expressions and assembly, are quite likely to be the very thing that might set off a revolution in Iran."

Today Herz, 62, recalls that he arrived in Tehran just as Khomeini was banished from the country to Najaf, Iraq. Later, at the request of the shah, Iraq expelled the religious leader.

"Najaf is not known as a communications hub of the world," notes Herz dryly. "In my opinion a very important turning point in the fortunes of Khomeini, and thus also the fortunes of Iran, occurred when, at the request of the shah, he was expelled from Iran and went to Paris -- which is a commmunications hub of the world, and from which his message had a much easier time getting to Iran.

"I'm quite convinced that the U.S. did not have the capability of bringing about much internal political change in Iran in 1964, but the fact that people believed it was a terrible American liability," says Herz. "The shah was not yet as cruel as he later came to be; he was despotic but not tryannical. And the opposition, while to some extent devoted to the ideals of democracy, was not really disciplined, systematic or practical. It was all a matter of talk. For that reason, even while I noted the pervasive lack of support for the shah, I didn't predict in 1964 a revolution in the forseeable future."

Footnote: Herz, who retired after serving as ambassador to Bulgaria between 1974 and 1977 ("No country in Europe was less important to Secretary Kissinger than Bulgaria except possibly Albania"), also credits another small item to Khomeini's return to power: the cassette tape. From his post near Paris, Khomeini would tape revolutionary messages on cassettes easily carried and copied by hid devotees throughout Iran.