Amir Abbas Hoveyda, Iran's prime minister from 1964 to 1977, was machine gunned to death after a secret trial last night in a new wave of executions ordered by radical supporters of Aytollah Ruhollah Khomeini.

Iran's official radio station announced the unexpected execution by saying that Hoveyda had confessed to "repression and the cultural and political strangulation of Iran."

But Reuter quoted an Iranian photographer who watched the trial as saying that Hoveyda had not admitted guilt and had rejected the charges against him.

The execution of Hoveyda, who was the Islamic revolution's most important prisoner, is a major blow to Prime Minister Mehdi Bazargan and revealed continued internal struggle between his moderate regime and Islamic radicals.

Bazargan had condemned earlier similar secret trials and executions as "irreligious, inhuman and a disgrace to the country." It was his intervention with Khomeini last month that led the ayatollah to call a halt to such practices just hours before Hoveyda was scheduled to go before a firing squad on March 16.

Since then, Iranian officials have told visitors that foreign correspondents probably would be admitted to Hoveyda's trial and that a French lawyer would be allowed to defend the 60-year-old former prime minister.

The surprise announcement of Hoveyda's execution followed the deaths of two generals and four other Imperial Guard officers who went before firing squads earlier yesterday.

The United States criticized the execution in a statement which said: "We deeply regret and deplore, both on grounds of human rights and justice, the execution of Mr. Hoveyda following a secret trial in which he was apparently not allowed proper defense or the normal elements of due process and justice."

The statement, issued by the State Department, said that "we do not comment on the guilt or innocence of the persons accused in the revolutionary trials. But in this case as in others, we have made plain to the Iranian government our firm conviction that internationally accepted standards for open and fair trials should be observed."

It was generally believed that Bazargan, a prominent civil rights activist during the former shah's long rule, had wanted an open and fair trial for Hoveyda as a way to demonstrate alleged misdeeds of the former government and thus publicly justify policies and actions of the Islamic revolution.

But the reported plan for a "Nuremberg-type trial" apparently was again preempted by the radicals in the same way as the Feb. 16 execution after a secret trial of Nematollah Nassiri, who as former head of the notorious secret police SAVAK was another key symbol of the shah's rule.

According to a witness quoted in reports from Tehran, a blindfoled and trembling Hoveyda was machine gunned in a dingy prison courtyard after being tied to a metal ladder.

His bullet-riddled body was taken from the Qasr Prison by an ambulance to the capital's morgue.

A trail of fresh blood was seen near a hoist at the morgue and three coins lay there, thrown down by Iranians because of a Persian tradition of placing beside a corpse money to be distributed to the poor. Reporters were not permitted to see the body.

In giving the official account of Hoveyda's trail before a revolutionary court, the state radio, Voice of the Islamic Republic, said last night that the former prime minister was found guilty of being "a corrupt element on earth, responsible for spreading corrpution and reason in Iran."

The broadcast quoted Hoveyda as having "confessed" his guilt and saying, "I want the Iranian people who were tortured to forgive me and for God to forgive my sins."

There were conflicting reports also about the fact of Princess Fatemeh, 49, a sister of deposed Shah Mohammad Reza Pahlavi. The princess, who has lived in seclusion since the death of her second husband three years ago, is the only member of the imperial family still in Iran.

According to Tehran reports, confirmed by a prison official, the princess was arrested during a police sweep Friday and yesterday in which 35 persons associated with the former government were jailed. But the state radio quoted a government spokesman as denying the reports.

Hoveyda was placed under arrest by the shah last fall in an apparent attempt to appease a growing antimonnarchy sentiment in the country. He escaped from prison during the final days of the popular uprising which toppled the shah in mid-February. Subsequently he turned himself in to Islamic revolutionaries.

The charges against him included spying for the United States and for "Zionism," smuggling heroin, allowing foreign interests to exploit Iran's natural resources and "entering into battle against God and his emissaries on Earth."

A number of world leaders, including U.N. Secretary General Kurt Waldheim and five former French prime ministers, had appealed for Hoveyda's life.

Among the six other officials executed yesterday at the Qasr Prison were Air Force Gen. Gholam-Reza Iraj Amini Afshar, former martial law administrator of the city of Najafabad, in central Iran and Maj. Gen. Mohammed Jaavad Molavi Taleghani, former Tehran police chief.

The two generals and four Imperial Guard officers were charged with killing, or ordering the killing, of anti-shah protesters.

In addition to the seven executions yesterday, three other former police officers were shot by a firing squard in Isfahan Friday.

The upsurge of executions of political prisoners followed a three-week lull ordered by Khomeini last month. At least 49 political prisoners were executed before the ayatollah's order.