Security, a major U.N. concern even for relatively minor visitors in a violent age, has caused an outbreak of near-paranoia in plans for Soviet leader Mikhail Gorbachev's brief stay next Wednesday.

"It's an Excedrin headache," one official familiar with the arrangements, who asked not to be identified, said Saturday.A main problem appears to be an expected huge influx of journalists in a city sometimes called the media capital of the world.

No member of the general public will be able to enter the United Nations while Gorbachev is here, officials said.

Although the Soviet leader may be at the United Nations no more than about four hours in two trips, safety precautions will far exceed any put in place when Soviet Premier Nikita Khrushchev, Cuba's Fidel Castro and a score of other leaders attended simultaneously the 15th U.N. General Assembly in 1960 and remained for days on end.

That was before fears of terror attacks. "We thought we were fairly strict then," a veteran official said, "but it was a tea party compared to this."

Twenty-eight years ago Khrushchev, Yugoslavia's President Tito, Egypt's Gamal Abdel Nasser, Indonesia's President Sukarno and Ghana's President Kwame Nkrumah were freely accessible to reporters and the Soviet premier's bantering provided items for the evening news before the days of sound bites.

For this trip - no top Soviet leader has visited here since Khrushchev - Gorbachev will function in a strictly controlled environment as far as the media are concerned.

U.N. and Soviet officials - with help from United States security services and New York police who in 1960 were not even allowed to set foot in this international territory - will enforce unprecedented safety measures.

The main gates will be closed to reporters and TV crews. Even permanent correspondents who work here year-round, for the first time will have to pass through a metal detector and face possible personal searches when they come into the U.N. compound through what is normally a public entrance.

U.N. accreditations officer Cecilia Baduria-Unger said correspondents visiting the headquarters for even a half-hour will have to have their photographs taken for the requisite pass. No passes will be issued on the day of Gorbachev's visit.

Philippe Debeusscher, bureau chief of Agence France-Presse and president of the U.N. correspondents association, said he was told the restrictions were "set in concrete and not subject to negotiation or change."

Official U.N. TV crews will cover Gorbachev and his party from their arrival at about 10:00 a.m. EST Wednesday until his scheduled departure at noon to travel by boat to Governors Island.