The United States yesterday ordered its citizens to leave Iran immediately, as concern mounted in Washington over signs that discipline and command structure is beginning to crumble in the Iranian military.

In the largest and most dramatic movement of U.S. personnel since the evacuation of Saigon in April 1975, the State Department authorized the U.S. embassy in Tehran to order almost all of the estimated 10,000 American still in Iran to leave "temporarily at the earliest feasible date."

Iranian soldiers are deserting their units in increasing numbers, according to intelligence reports reaching the State Department. Losses previously counted in dozens are reaching hundreds from some units.

In an incident that deeply concerns the Carter administration, Iranian forces acting on their own have banned U.S. advisers from entering an Iranian air base where highly sophisticated F14 fighters are located, State Department working groups have been told.

The administration is not only concerned over a potential breakdown in the Iranian commans structure, but also that one of the 78 Iranian-owned F14 fighters and its advanced Phoenix missiles could fall into Soviet hands unless stringent security precautions are maintained.

Deputy Under Secretary of State Ben H. Read, who headed the Iran working group subcommittee that reviewed the evacuation order issued yesterday, confirmed that the growing number of army desertions had been "One of many factors" that went into the decision.

Read also said that a "slowly increasing number of incidents" involving violence directed at Americans had figured prominently in the talks over the order, which had been under discussion in exchanges between Washington and the embassy in Tehran "for weeks."

Portraying the move as "a cumulative decision" that was not triggered by specific incidents of the past few days or because of fears of immediate new violence, State Department spokesman Hodding Carter said the order was issued because of "the uncertain security situation" in Iran. Other U.S. officials acknowledged, however, that the move would be widely seen as an open statement of declining confidence in the ability of the government of Prime Minister Shahpour Bakhtiar to restore order as he faces the promised return this week of Ayatollah Ruhollah Khomeini from exile.

The evacuation order was also the most convincing evidence yet of the sharp decline of American ability to influence events in a country that, until a few months ago, was considered the strongest pillar for Western interests in the Persian Gulf and Indian Ocean regions.

Until October, roughly 45,000 Americans had been drawn to Iran's oilfields, factories and military bases. But as the social and political protests that drove Shah Mohammad Reza Pahlavi from his throne this month began to mount, U.S. companies started pulling out dependents and many workers.

In contrast to the sharp devate within the administration over a December decision to authorize government payment for official U.S. dependents to leave Iran -- at a time when the White House wanted to do nothing that indicated a lack of confidence in the shah -- yesterday's decision was reached without dissent, according to several State Department officials.

Bakhtiar was informed Monday that the announcement would be made, Carter said. He delinied to characterize the prime minister's reaction to the politically sensitive decision, which may trigger similar moves by European countries.

The 10,000 Americans still in Iran include 880 military advisers, 267 of whom have been declared nonessential and who will be leaving, Carter said. A Defense Department spokesman said that earlier this month the Pentagon began not sending replacements for service personnel whose tours of duty were finished.

Carter emphasized that U.S. companies should bring their employes back, since few were able to work in the severely disrupted Iranian economy. He said that about half of the U.S. civillians in Iran are expected to depart on regular commercial flights or charters in the next few days.

Carter sidestepped questions on whether the administration had received assurances from the Bakhtiar government that it would keep the country's airports open long enough to permit the evacuation. The government closed all airports for the past week to keep Khomeini out, and the airfields were reopened only hours before the embassy announcement of the evacuation was made in Tehran.

Four U.S. consulates outside Tehran will continue to operate, the state Department said, although the total of 144 U.S. embassy personnel and dependents will be pared.

Defense contractors are moving quickly to airlift out their employes. Grumman Aerospace Corp. and Bell Helicopter are to send charter flights today into Isfahan, where anti-American sentiment is reportedly growing more violent each day. Reports that the companies are also preparing efforts to evacuate helicopters and other equipment on lease to the U.S. government or to Iran could not be confirmed immediately.

Defense Department spokesman Tom Ross told reporters yesterday that none of the F14s owned by Iran has been removed from that country, and Defense Secretary Harold Brown said Monday that he was satisfied that there was adequate security for sophisticated weapons in Iran.

Under existing agreements, however, the Iranian government is totally responsible for the security of the bases on which the F14s are located. The agreements require the Iranians to establish stringent security measure, but some U.S. officials fear that the administration has no effective way of making the Iranians observe those agreements to the letter in light of the continuinng radical changes occurring there.