The United States would act on its own to keep open the vital oil route through the Strait of Hormuz even if other nations refused to help, a high-ranking U.S. military official said here today.

The official said the United States would ask other nations -- including some along the Indian Ocean, such as India, that have opposed a U.S. naval presence in this area -- to help remove any blockade to the strait, through which 40 percent of the noncommunist world's imported oil passes.

"If the United States is unable to get the cooperation, I would expect we will act unilaterally," added the U.S. military official, who could not be identified under ground rules of a briefing held at the American ambassador's residence here.

He said the forces now in the Indian Ocean and the Arabian Sea are adequate to do the job at the present time.

The commander of all U.S. military forces in the Pacific and Indian oceans, Adm. Robert Long, concludes a four-day visit to India Sunday that is part of a tour of the region. The tour is aimed at getting views of top officials and explaining U.S. policies to them. Long has already visited Bangladesh and Pakistan and will leave here Monday for Sri Lanka.

The official's comments take on added significance here, where the government of Prime Minister Indira Gandhi never has condemned the Soviet invasion almost 11 months ago of Afghanistan and has implied that Moscow was forced to move because of a buildup of U.S. forces in the area.

The American military official characterized Long's talks with Indian Defense and Foreign Ministry officials -- the admiral did not see Ghandi -- as a cordial exchange of views.

He said that keeping open the strait, a 26-mile wide waterway that leads from the Persian Gulf to the Gulf of Oman, "is clearly in India's own interest" and said the United States would be interested in having help from it. But he made it clear that he saw little chance of that.

Other nations, however, have moved ships into the gulf region as a result of the eight-week-old war between Iraq and Iran, which has threatened to spill over into the strait, closing that waterway.

At least 60 Western warships, slightly more than half of them American, are now in the area. Other ships have been sent by Britain, France and Australia. France, reacting to a possible threat to close the strait, has sent mine sweepers. In all, the West's force is about twice that of the Soviet fleet of 29 ships reported in the region.

The American military official made it clear here tonight that he now discounts the prospect that Iran in a desperation move will try to close the strait, either by mining it or using its swift patrol boats or shore-based heavy artillery to harass shipping.

Instead, the official said, the threat to the strait comes from the Soviets as part of a world-wide effort to undermine the Western alliances by gaining control of this oil lifeline.

"If that oil comes under the control of the Soviets either directly or indirectly, you will find the economies of the industralized democracies would come to a screeching halt or you would find there is a political accommodation with the Soviet Union," the official said.

Without being specific, the U.S. military official echoed the view of U.S. Defense Secretary Harold Brown that the rest of the Western world, especially NATO nations and Japan, should do more to protect the oil-rich gulf area from the Soviets.

The United States has won agreements from three nations -- Oman, Kenya and Somalia -- to use their facilities in emergencies, and it is expanding a base on the British-owned island of Diego Garcia in the Indian Ocean. Seven merchant ships are anchored off that island carrying the equipment for a U.S. rapid deployment force that might be sent into the region.

Nonetheless, the official said, the United States would like to encourage other nations to allow U.S. ships to make "peaceful port visits."