Ayatollah Ruhollah Khomeini yesterday ordered the release and immediate deportation of women and blacks among the 70 hostages held at the American Embassy here since its siezure two weeks ago by Iranian militants.

The state radio said the militants holding the embassy had accepted Khomeini's directive to free the estimated 10 women and blacks.

But shortly before midnight, 11 hours after Khomeini made the announcement, the ayatollah's son, Ahmad, emerged from the embassy and said the hostages would not be released until at least today.

The younger Khomeini, assigned to work out the details of the release, gave no explanation for the delay. There was speculation that disagreements had arisen among the students holding the hostages or that Iranian authorities were attempting to keep the release and movement of the hostages secret.

President Carter, in a statement issued by the White House, welcomed the announcement that some of the Americans would be released and urged that Iranian authorities move to release the remaining hostages.

"We strongly urge that the authorities in Iran now move to secure the safe release of all those still being held," Carter said. "Their ordeal is not over. The United States will continue to work in every channel open to it to achieve that end."

Khomeini justified his clemency on grounds that "Islam reserves special rights for women" and that "blacks for a long time have lived under oppression and pressure in America and may have been sent [to Iran under duress.]"

But the 79-year-old spiritual leader stressed in a sharply anti-American statement that the other hostages will remain in custody until the United States accepts Iran's demands for ousted Shah Mohammad Reza Pahlavi's extradtion.

Revolutionary Council members privately expressed hope that Khomeini's move to release some of the hostages would produce a conciliatory American gesture capable of helping resolve the deepening U.S-Iranian crisis.

Sadegh Ghotbzadeh, director of Iran's radio and television and a Revolutionary Council member, said he negotiated for more than two hours at the embassy to overcome the "hard feelings" of the militant Islamic students even after they listened to Khomeini's announcement on the 1 p.m. radio news.

When the release of women and black hostages was first broached Thursday by Ghotbzadeh and Foreign Minister Abol Hassan Bani-Sadr, the students rejected the proposal.

In a telephone conversation with Bani-Sadr Thursday, students leaders insisted that only direct orders from Khomeini would change their mind, according to informed sources.

Friday night in Qom, the holy city 80 miles south of here where Khomeini resides, the ayatollah agreed that "immediate action" was required, according to Ghotbzadeh.

Khomeini basically favored the principles of releasing the women and blacks, Ghotbzadeh said, but had been "hesitant to interfere with the students," who have become one of the many power centers in revolutionary Iran.

But Khomeini finally decided to act decisively when told "without his intervention the negotiations would go on and on" with the students, Ghotbzadeh said.

The students' refusal to obey the Revolutionary Council increasingly has cast doubts about the cohesiveness of the supposed ruling body and even about the normally uncontested authority of Khomeini.

Judging from the total silence of the crowd massed outside the embassy when loudspeakers broadcast his release orders, Khomeini could have freed all of the hostages without causing a stir. Nonetheless, the crowd almost immediately went back to shouting slogans condemming President Carter and the shah and praising the ayatollah.

Bani-Sadr has said that he and others told Khomeini from the beginning of the siege that holding the hostages was counterproductive because it was misunderstood throughout the entire world.

Some Revolutionary Council members argued along with Western ambassadors that the hostages' detention conditions were unacceptable, especially having their hands tied when being taken out for exercies. They also noted the decided lack of support from other Moslem countries for the hostage-taking and the generally bad image it has given Iran's revolution.

The Palestine Liberation Organizationhs representative in Tehran said the PLO first suggested the release of the blacks in recognition of its own rapprochement with American blacks following Andrew Young's resignation as U.S. ambassador to the United Nations last summer.

Hours after Khomeini's orders were broadcast, student leaders said they were still checking the records of the men and women to be released to ensure compliance with the ayatollah's insistence that they be freed, "provided they are innocent of epsionage."

In what some analysts suggested was a deliberate effort to protect themselves from accusations of caving in to the United States, the ayatollah's language in his message to the students was as sharply worded as ever.

He described the embassy as a "center of conspiracy and espionage" and said "the people inside who have plotted against the Islamic movement do not deserve international political respect."

The Iranian revolutionaries have argued that diplomatic immunity guaranteed foreign missions does not apply to the U.S. Embassy because it was really a spy center.

"Threats and all-out propaganda by the American, government are not worth a penny," he said, "nor are military threats or economic blockades by America wise or important."

That was taken as an allusion to Carter's decisions this week to boycott Iranian oil purchases and to freeze Iranian government assets in the United States.

"Carter is making a big mistake to think all governments in the world are serving him blindly," the ayatollah added.

"He will soon realize his big mistake," he said. "The Iranian nation has risen to prevent this nest of espionage from continuing its shameful activities."

"Until the extradition of the traitor Mohammad Reza [Pahlavi] and the return of his money, the nest of espionage and professional spies will remain as they are.

"Dear students, give some women and blacks whose spying is not certain to the Foreign Ministry in order to have them deported, immediately." he said.

Taken at face value Khomeini's conditions for releasing the remaining hostages were considerably tougher than those outlined throughout the week that progressively scaled down Iranian demands.

The last offer, made by the foreign minister, asked only that the United States accept an investigative commission to talk to the shah, and it no longer demanded his immediate extradition as a precondition.

The Revolutionary Council also has considered asking the students to release the fewer than 10 non-American hostages. But Khomeini made no mention of them in his statement.