MANAMA, Bahrain (AP) _ Defense Secretary Caspar Weinberger said today that the Iranian vessel attacked by U.S. forces in the Persian Gulf would be ''destroyed in the most effective way possible.''

Weinberger made the comment during an interview aboard a U.S. navy frigate in the gulf, where he flew by helicopter hours after arriving in the region for a five-day visit.

''The ship will be destroyed. It certainly will not be handed back so that it can engage in further activities,'' the Pentagon chief said. Asked how it would be destroyed, he said, ''In the most effective way possible.''

Weinberger did not say when the destruction would take place, only that it will be announced ''as soon as it's finished.''

Naval sources on the USS Guadalcanal in the gulf told a member of a Pentagon-organized pool of reporters that the Iran Ajr had been wired with explosives and would be sunk before dawn Saturday.

Weinberger, asked if the Iranian government would be told of the ship's destruction, said, ''They'll see it when she goes up, or down, I should say.''

He told pool reporters that the area where the 1,662-ton Iran Ajr was attacked by U.S. helicopters Monday had been ''charted'' and that ''several more'' mines were found.

The United States said the Iran Ajr was planting mines in international waters of the gulf. Iran has acknowledged the boat was a naval vessel but denied it was sowing mines.

''When the locations are all known, and we're pretty close to that now, then the normal (mine) sweeping operations would commence. We're quite hopeful and reasonably confident that all the mines that this particular ship laid could be destroyed,'' Weinberger said.

Five Iranians were killed and 26 others taken into U.S. custody after the attack on the Iran Ajr. The survivors are to be returned to Iran on Saturday, U.S. officials said.

Weinberger described the alleged Iranian minelaying as ''one of the grossest violations of which the Iranians have been guilty ... this putting lethal weapons, mine systems, in international waters.'' He said the United States would destroy any other such vessels.

''We're very hopeful that this one episode will be a sufficient warning so that they will stop it, but we are not going to go on the basis of hopes,'' he said.

Weinberger said the Monday incident had provided ''absolutely incontrovertible proof'' that the Iranians were laying mines in the gulf.

Weinberger arrived under tight security and went to the USS Hawes, a guided missile frigate that is among the U.S. warships escorting U.S.-flagged Kuwaiti tankers through the gulf.

The defense secretary told the 200-member crew of the Hawes, in a speech from the bridge, that they were doing ''the most important military duty'' for the United States at this time.

He said he brought greetings from President Reagan, who ''wanted me particularly to let you know how important the works are that you're doing, not only for the United States, but for our allies and indeed for all the countries interested in freedom.''

The 3,585-ton Hawes is a sister ship of the USS Stark, which was struck by an Iraqi missile May 17. Thirty-seven Americans died in that incident, which Iraq said was accident.

''I would hope that the political will of the United States is as strong as the men out here defending us. And I would hope that everybody recognizes that there are going to be some risks involved in this operation, and that means there will be good days and bad days,'' Weinberger said.

''But what we saw with the destruction of this Iranian minelayer and the gathering of this absolute evidence of what they were doing, was regarded by the men who did it as a routine daily effort, and we regard it as an extraordinarily effective achievement.''