Iranian security forces killed two alleged terrorists who were trying to enter a "Jewish Agency" in downtown Tehran today, government officials said.

Western diplomatic sources said the agency was an Israeli trade center. It was the first known incident of a guerrilla attack against an Israeli establishment in Iran.

The shootout, in which two security men were also wounded, came about 12 hours before U.S. Secretary of State Cyrus Vance's scheduled arrival here. Vance is to confer Friday with Shah Mohammed Reza Pahlavi and to attend a meeting of the Central Treaty Organization Saturday.

A senior official of SAVAK, the Iranian secret police, said the two men were members of an "Islamic-Marxist" organization, an umbrella group that includes antigovernment guerrillas of both Moslem and Communist convictions.

Iranian authorities have blamed the group of the assassinations of three American technicians last yer and have charged that they were financed and trained by Libya and radical Palestinians.

The SAVAK official, and an Information Ministry statement issued later, said the men were killed at the "Jewish agency." But they would not further identify the agency.

Israel does not have a recognized embassy in Tehran but maintains a diplomatic mission near the scene of the shootout, Iran, a Moslem but non-Arab country, has friendly relations with Israel, and the Israeli intelligence service, the Mossad, helped setup SAVAK in the mid-1950s.

An Israeli mission official refused comment on the shootout.

"The terrorists' reason for going to the agency could not be ascertained because they were both killed," the Information Ministry spokesman said. He said the wounded security men are in satisfactory condition.

The spokesman indicated that the guerrillas were challenged by security men in the area. Scores of other security forces were rushed to the scene after the shooting began, and lengthy submachine-gun fire was heard. The street was cordoned off, and nearby office workers were unable to leave their buildings.

So far this year, 15 alleged terrorists including six women have been killed in shootouts with security forces. Last year more than 90 were either killed in gunfights or executed.