Iranian President Abol Hassan Bani-Sadr believes that war with Iraq has vindicated his view that "competence and patriotism" on the part of the armed forces is more important than "fidelity to the regime" led by Ayatollah Ruhollah Khomeini.

As commander-in-chief of the Iranian armed forces, Bani-Sadr said his primary task is "restoring the morale of the soldiers, many of whom considered themselves humiliated by the new revolutionary regime." Several of them have proven their patriotism by dying in battles against Iraq since he had them released from prison, he said.

This and other observations on the war and his role in revolutionary Iran emerged during a 24-hour visit to the front with Bani-Sadr earlier this week. e

Throughout the tour -- in his huge, map-hung office at Army headquarters, in a motorcade crisscrossing the capital at high speeds, in his personal plane or in a helicopter flying over the blazing oil refinery at Tabriz, at a military base close to the capital of Azerbaijan -- Bani-Sadr answered questions with what appeared to be Olympian calm.

In Tehran, when the plane ready to fly us to Tabriz was delayed for more than an hour by two successive Iraqi air raids, Bani-Sadr imperturbably walked across the tarmac to the VIP lounge while the Iraqi Air Force blasted away. He stopped on the field to greet Iranian military guards with large waves of his arms and smiles.

The second air raid caught the presidential plane just as it was gathering speed for take off. The pilot screeched to an emergency stop at the edge of the runaway and, as the aerial dogfights began again, Bani-Sadr walked 100 yards to the shelter of some trees and continued his conversation.

In Tabriz, as we flew in a helicopter over the blazing refinery bombed only two hours before, two Iraqi Migs appeared on the horizon. The helicopter made an emergency landing and its occupants dispersed in a field.

Bani-Sadr remarked: "Whatever they do, whatever it costs us, (Iraq) will lose the war.

"Baghdad's aggression did not take us by surprise," he explained. "At the beginning of August, we already had in our hands outlines of (Iraqi President) Saddam Hussein's plans as well as a detailed account of the conversations which had taken place in France among the Iranian counterrevolutionaries, the Iraqi representatives, American and Israeli military experts."

Documents of that meeting, which he claimed Iran had bought in Paris and "had to pay dearly" for, "have proved to be surprisingly accurate."

"The unfortunate Saddam Hussein thought he could take us by surprise," Bani-Sadr said, "and do what Moshe Dayan did to Egypt in June, 1967 -- nail down our aircraft on the ground from first hours of the war and proclaim victory on the third day.

But we took the precaution of keeping our aircraft under cover and none of them was destroyed on Sept. 22. We knew exactly the strength of the land forces to be engaged: seven divisions, including three armored, and the measures we took enabled us to decimate at least two of them."

As commander-in-chief, he had sought to restore "the morale of the soldiers, many of whom considered themselves humiliated by the new revolutionary regime." mHe said he had tried to limit the purges, and right from the start of the war had released 50 officers who had been arrested for plotting against the republic.

One of these officers, an infantry colonel, fell over himself with gratitude before Bani-Sadr as the president sat with a visitor at army headquarters. "All is forgiven," Bani-Sadr said. "Now go and conquer Baghdad."

He added for the apparent benefit of his visitor: "As far as I'm concerned, competence and patriotism come before fidelity to the regime. And I was right -- several of the officers I've had freed were killed at the front. "I've given the army back its pride while uniting it with the people. And I've actively prepared it on a technical level. When I came to power last January, the three service chiefs told me that our forces would be 5 to 25 percent operational.

"A major problem arose because we had supplies and spares but could not use them," Bani-Sadr said. "The Americans, who had been paid $250 million by the old regime to computerize the type, location and availability of the spare parts, had left the country leaving the computers out of order.

"The seven teams of Iranian technicians I immediately set up managed to solve the problem by working day and night without a break for months.

"In addition," he said, "we have imported -- and still import -- material, especially American, which international dealers have no trouble obtaining. We are now waiting for the enemy to run out of supplies before we go over to a devastating counter-offensive."

Asked whether his plans were likely to remain merely hypothetical, in view of possible Soviet supplies to Iraq under the friendship treaty between the two countries, Bani-Sadr said that the Soviet ambassador here "assured me a few days ago that his country has stopped giving military supplies to the Baghdad regime in accordance with" Moscow's proclaimed neutrality. "Up to the time I am speaking to you," he said, "I have no information to contradict the diplomat's statement.

"The Soviet Union is convinced that this war can only serve the interests of American imperialism," Bani-Sadr maintained. Besides, he said, the Soviets cannot afford to offend Iran for fear of spoiling our relations in future years. We don't have short memories and our Soviet neighbors know it well. That's why I tend to believe for the moment in the sincerity of Soviet neutrality."

And of U.S. neutrality? Bani-Sadr interrupted with a long laugh. "Let's be serious," he said. "I have already told you that the Americans have actively taken part in the preparation for Iraqi agression."

"Since the fall of the shah they have not stopped plotting against us," he said, "trying to stifle us," including seizing Iranian bank assets, the trade embargo "and today the war intended to destroy our economy and break the will of our people to remain outside the American sphere; and in the end overthrow the Islamic republic to reestablish a government made up of puppets like Mr. [Shapour] Bakhtiar, who moves between Paris and Baghdad."

Bani-Sadr said he saw release of the hostages as no solution to these problems. "The United States is using (the hostages) to put their Middle East strategy into operation. Every time we were on the verge of a way out, they started provocations to torpedo a solution." They are trying to impede what the contagion (of the Islamic Republic) from spreading."

He said Iran had threatened sanctions against Arab governments in the Persian Gulf "because they are partly linked to the United States and Iraq; because they could still provide the latter with military facilities. "He added," I will tell you this straight out: our armed forces will deal roughly with any Arab country which adventures into lending support to the Iraqis. For, example, in the case of other states entering the war against us, we will not hesitate to close the Strait of Hormuz to international shipping."

Bani-Sadr said Iran did "not want to deprive" Europe of its oil supplies that flow through the Strait. But Europeans disappointed him because "they have preferred to follow blindly the orders of the United States."

He said he was "fully reassured" about the "internal front" here in Iran since all the tribles and minority groups, including the Kurds and the followers of Ayatollah Shariatmadari in Azerbaijan are lying low and "would not dare to stage an uprising while the entire population is united against the aggressor."

"This war," Bani Sadr added, "has served -- contrary to what Baghdad and Washington had hoped -- to consolidate our republic."