Federal immigration officials have ordered a nationwide manhunt for nine Iranians jailed during a turbulent July demonstration in downtown Washington who they abruptly ordered released shortly afterwards but now concede should have been held for deportation.

The nine were among 191 pro-Ayatollah Ruhollah Khomeini demonstrators who were arrested here during an apparently well-orchestrated protest July 27 and then transferred to two federal prisons in New York. All were set free after senior officials of the Immigration and Naturalization Service stated that checks into their visa status turned up only two who were in the country illegally.

Those two were released anyway and are now among those being sought. Several others whose illegal presence in the country at the time of the demonstrations was known to immigration officials outside New York but not to those on the scene are also among the nine referred to in the search order.

The order, sent as a top priority telegram earlier this month to nine INS offices around the country, informed agency investigators that subsequent checks into the immigration status of the demonstrators revealed that, in addition to the two, at least seven more were deportable at the time of their release from federal prisons in Otisville, N.Y.

Immigration investigators have charged that the 191 demonstrators were released before checks to determine whether they were in the country legally could be completed. Their allegations initially were denied strenuously by senior INS officials, but subsequently the national INS office ordered an investigation into the circumstances surrounding the protestors' release.

Of those who were being sought at the time they were arrested here, one had been in the country illegally since his student visa expired in October 1979. Immigration officials had been looking for him since March of this year, the telegram showed.

The visa of another had expired in January 1979. He had also failed to register as an Iranian student following the issuing of regulations late last year requiring all Iranian students to do so. The third had been asked to appear for an interview with investigators before the July 27 demonstration but never reported.

At least one of the nine has been apprehended since the telegram was sent Sept. 3, while at least one other is known to be still at large. The status of the search for the other seven could not be learned yesterday.

An INS spokesman said Friday that he would have to wait for the completion of the service's investigation before he could comment on the telegram and its implications. That investigation is expected to be completed within the next two weeks.

INS investigators already demoralized by what they felt was a hasty decision to release the demonstrators greeted this latest order with dismay.

"We just looked at that order and shook our heads," said one field investigator. "We already had them, and now we've got to go back on the street and find them again. It's just the latest example of how screwed up the central office is."

Investigators feel that despite the assurances of the central office proper procedures were not followed in determining whether the protestors were here illegally.

They claim that superiors ordered them to restrict their questioning of the demonstrators to only those questions that attorneys representing the demonstrators agreed to in advance.

In addition they said that too few phones were available at one of the New York prisons where the demonstrators were held to enable investigators to cross-check the answers given with the INS central computer here in Washington and with the local offices around the country.

As a result, they charge, more than 100 demonstrators were released without their status ever having been verified.

Following the release of the prisoners Aug. 6, about 50 INS investigators in the New York area staged a sickout and refused to report to work for a day. They returned under threat of disciplinary action.

White House special assistant Jack Watson ordered the Justice Department to investigate these charges and that task was assigned to Deputy Attorney General Charles B. Renfrew. His investigation has since been shelved while the INS conducts its own investigation into the release and "the conduct of some of the investigators," a Justice Department spokesman said yesterday.

Several congressman have shared the concern of the INS investigators and have demanded an explanation from the Justice Department, which oversees the INS.

Rep. Elizabeth Holtzman (D-N.Y.), chairman of the House subcommittee on immigration, refugees and international law, has written Attorney General Benjamin Civiletti that, according to her sources, "it appears that far more students" were here illegally "than the public has been led to believe."

Some investigators say they believe the White House may have ordered the premature release of the demonstrators because their jailing was having an adverse impact on its efforts to negotiate the release of the American hostages who have been held in Iran since Nov. 4.

During the 10 days the demonstrators were imprisoned, Khomeini himself had charged that the demonstrators were being tortured. The situation was further complicated by the fact that many of the demonstrators went on a protracted hunger strike that brought several of them near death during their detention.

Yesterday, however, Justice Department spokesman John Russell denied that there had ever been any pressure from the White House to release the demonstrators quickly.

"I sat in on all the meetings . . . No one asked us for any shortcuts," Russell said.