The United States yesterday accused Iran's leader, Ayatollah Ruhollah Khomeini, of fanning anti-American violence in Pakistan and warned Iran not to make the mistake of doubting U.S. determination to win the safe release of the American hostages in Tehran.

In a further escalation of the toughened stance adopted by the Carter administration on Tuesday, U.S. officials accused Khomeini of "false and irresponsible" statements that helped "create the climate" for the attacks yesterday on the U.S. Embassy in Islamabad.

The officials also responded to threats from Iranian militants that the hostages would be killed if the United States resorts to military force by saying they hold Iranian authorities responsible for their safety. In addition, the officials charged Iran with using harsh brainwashing techniques on the American captives.

This barrage of tough rhetoric came as President Carter and his top advisers struggled simultaneously with the tasks of ensuring the safety of Americans in Pakistan, assessing whether the rioting there was a portent of spreading trouble throughout the Persian Gulf region and continuing the 18-day effort to have the hostages in Tehran freed.

On the larger question of whether the region that diplomats have dubbed "the arc of crisis" is on the verge of exploding in a chain reaction of turbulence, the officials stressed that it is too early for what one called "instant analysis."

Although they said the United States, "is not ruling out any possibilities" until it has more information, the officials added that their immediate impression was that the events of the preceding 24 hours in Tehran, the Saudi Arabian city of Mecca and Islamabad were not connected in the sense of being an orchestrated or centrally directed plot.

But, they also noted, the sequence of events in widely separated parts of the region -- Iran's taking of diplomatic hostages, the seizure of a mosque in Mecca and the attacks on the U.S. Embassy in Islamabad by mobs believing the United States was involved in the Mecca events -- underscored the extreme volatility of the strategic area and made more imperative the need to defuse tensions there.

It was in this connection that U.S. officials singled out Khomeini for especially harsh criticism. Although they were very careful to avoid blaming any other country of source for inciting the mobs in Pakistan, they accused Khomeini point-blank of lying in an attempt to keep the rioting directed at the United States.

They pointed to a statement by Khomeini's office, broadcast by Tehran radio, that blamed the incident in Mecca on the United States and Israel. U.S. officials asserted that Khomeini made the charges in apparent awareness that the Islamabad embassy was under attack and that Saudi Arabia had described those who took over the mosque in Mecca as Moslems.

Previously, most U.S. statements had used such vague references as "Iranian authorities" rather than focusing on Khomeini directly. Administration sources said the rhetorical shift that became evident yesterday was dictated by "the increasing unescapable evidence" that Khomeini is calling the shots in Iran and that the United States looks to him personally for an acceptable resolution of the hostage crisis.

That approach began surfacing Tuesday night when the administration for the first time raised the possibility of military action if Iran goes ahead with threats to try the 49 remaining American hostages as spies.

Yesterday's rising drumbeat of tough rhetoric -- the accusation against Khomeini, the charges of brainwashing and a reference by State Department spokesman Hodding Carter to the militant students holding the hostages as "gangsters" -- appeared to be part of a deliberate strategy of underscoring the seriousness of the U.S. determination not to back away from Tuesday's warning. $ the first Iranian reactions to this get-tougher stance all seemed to involve such defiant gestures as the threat to kill the hostages. But, administration sources said, such responses "had been anticipated," and they added that Washington intends to keep the pressure on, in an effort to convince Khomeini that he must turn to diplomatic solutions based on agreement to free the captives.

While the contest of wills with Iran was going on, senior U.S. officials also spent a large part of yesterday first trying to account for the American diplomatic personnel who came under siege in Pakistan and then moving to ensure that such attacks are not repeated elsewhere.

Secretary of State Cyrus R. Vance met with ambassadors from 30 Islamic countries stretching from Africa to the Far East and asked them to cooperate in providing better security for U.S. embassies in their countries. cHe also thanked some for their efforts to help win release of the hostages and gave special thanks to Pakistan for rescuing the Americans in Islamabad from their attackers.

Later yesterday, Vance and Deputy Secretary Warren M. Christopher held similar meetings with the rest of the diplomatic community in Washington. h

As a "reasonable precaution," the State Department last night ordered the departure from Pakistan of about 300 nonessential diplomatic personnel and dependents of U.S. government employes.

In regard to the hostages, White House press secretary Jody Powell enumerated what he called some of the "very sophisticated and very subtle techniques" used on the American hostages. These included their total isolation, with no communication among them, and the use of "forged documents and other measures" designed to convince them that "their own government had abandoned them," he said.

Powell did not refer to brainwashing, but that was his clear implication."These are very reminiscent of some of the more sophisticated techniques to break down prisoners or hostages that we've seen in the past," he said.

Later, a senior administration official accused what he called "the so-called students" holding the hostages of attempting to deceive world opinion. He said the Iranians had been taking messages for the hostages, but had not passed them on to their captives.

Last week, the official noted, there were reports that Khomeini "had expressed concern about the binding of the hostages, with the implication that the practice would be stopped. The practice has not ended at all," he said, adding that some of the Americans apparently have been bound constantly during the 18-day ordeal.

There is no evidence of outright physical abuse of the hostages, the official said, but rather of a "sophisticated and calculated process of psychological pressure."

"To the best of our knowledge, no outside observers have visited the embassy in about a week," he said. "This is contrary to even the most rudimentary rules and accepted practices in a situation like this. There is a great need for the government of Iran to make arrangements for neutral observers and competent medical officials to visit the hostages and report to the outside world."

The 13 female and black hostages freed from the embassy earlier are to return to the United States today. Vance is expected to meet them at Andrews Air Force Base, but the president, in a deliberate decision to keep attention focused on the remaining captives, will not.

Powell told reporters: "It is our view that, as welcome as this safe release of these hostages is, we must keep uppermost in our minds that Americans are still being held hostage, that they are faced with the threat of some sort of trail in a country with a nonexistent system of justice where they have been virtually condemned already."

Officials yesterday also provided the outlines of the chronology leading up to the storming of the U.S. Embassy in Islamabad.

On Tuesday, after learning that the Great Mosque in Mecca had been seized, Vance sought to guard against a general upheaval in the Moslem world by ordering U.S. embassies to institute maximum security measures and by asking several foreign governments to increase security for American diplomatic personnel.

Late Tuesday, Carter conveyed the same request in personal messages to the heads of several foreign governments. The governments were not identified, but they presumably were Moslem nations, including Pakistan.

Powell said the president learned of the storming of the embassy in Islamabad shortly before 4 a.m. yesterday in a telephone call from Vance. After that, Carter, who is at Camp David, remained in almost constant contact with Vance and other officials, Powell said.

The president remained in seclusion at the Maryland presidential retreat, holding no meetings with advisers. He telephoned the mother of Steven J. Crowley, the Marine corporal killed in Islamabad, and issued a statement calling Crowley's death "a tragic loss and a stark reminder of the dangers the men and women of our armed forces face in the service of their nation."

Carter, also telephoned Pakistan's president, Gen. Mohammad Zia-ul-Haq. Powell said Zia asked Carter "to express Gen. Zia's deep regret and apologies for the attack, particularly his personel regret at the death of the American Marine. He asked that the American people be assured he is taking every possible action to assure the safety of Americans in Pakistan."

Congressional reaction to the continued upheavals in Iran remained harsh yesterday. Sen. George McGovern (D-S.D.), noting that "I'm known as a dove," said that if the American hostages in Tehran are killed, there should be "a quick and severly punishing reprisal by U.S. armed forces."