The United States tried and failed to rescue the American hostages in Iran with a commando-style raid in which eight U.S. crewmen were killed, the White House announced today.

The military operation, according to a post-midnight statement from the White House, was "aborted" because of an equipment failure, followed by a collision of two aircraft, at a remote desert location, in which the eight were killed and others injured.

The American troops, including the injured, were then airlifted safely from the unknown staging site in Iran, according to the statement issued by White House press secretary Jody Powell.

The statement issued shortly after 1 a.m. said:

"This mission was not motivated by hostility toward Iran or the Iranian people, and there were no Iranian casualties. Preparations for the rescue mission were ordered for humanitarian reasons, to protect the national interests of this country and to alleviate international tensions."

Officials at the Pentagon in the early-morning hours today declined to give any details of the abortive operation, asserting that some military activities related to the rescue attempt were still in progress.

In Tehran, Iranian leaders ordered an immediate investigation into the White House announcement but appeared to have few details themselves of precisely what had occurred, Washington Post correspondent William Branigin reported.

Army commander-in-chief Maj. Gen. Hadi Shadmehr said he had no indication of exactly where the aircraft collided, but his staff was checking all airstrips in the country. Diplomatic sources in Tehran said they had received reports of a landing in the southeastern Iranian province of Baluchistan Wednesday night [midday Wednesday in Washington] but had no confirmation of that.

At the State Department, Mark Johnson, an official of the Iran working group, said in the early morning that "we have no evidence of any reaction against the hostages."

Members of the families of 53 hostages held in Iran since last Nov. 4 were awakened with telephone calls from the government last night, notifying them of the raid and its failure.

In the highest control centers of Washington, the top officials of the government were meeting through the night -- the president at the White House, secretary of defense at the Pentagon and the secretary of state in Foggy Bottom. President Carter canceled a weekend trip to Camp David and scheduled a 7 a.m. appearance on network television.

"The United States continues to hold the government of Iran responsible for the safety of the American hostages," the White House said early today in its statement.

"The United States remains determined to obtain their safe release at the earliest possible date."

Bonnie Graves, the wife of one hostage held in the Tehran embassy, reacted sharply to the news: "I'm in a bit of shock and not very coherent," she said in tears from her home in Reston. "This is not what I call peaceful means. We've waited six months. Why couldn't we have waited a little longer?"

In London, Louisa Kennedy, wife of another hostage, said she was shocked and appalled by the news. "I hope nothing will happen to the hostages," she said. "I thought that American officials had decided not to do something like this."

The wife of one hostage, who asked that she not be identified, said she was stunned by the news of the aborted rescue attempt. "I just find it hard to believe that they could have been so uncoordinated, so clumsy." she said. "It doesn't sound like our army."

A week ago, President Carter began to warn of the possibilities of military action in Iran if there were no movement toward ending the crisis. At his news conference last Thursday, Carter urged news media organizations to consider pulling their correspondents from Iran, and the same warning was repeated by others in the govenment but not with any suggestion that an operation was indeed taking shape.

At a meeting earlier this week of senior White House staff members Hamilton Jordan assured worried officials that the United States was not contemplating a rescue raid, according to an account of the meeting carried in the Los Angeles Times. "Jordan told them flat out it had been studied and just wasn't feasible," an aide said then.