The Army announced Wednesday it would cancel production contracts for the controversial Viper bazooka-type anti-tank weapon after a congressionally mandated competitive shootoff showed a Swedish-made weapon was superior.

For more than two years, Senate and House critics of the costly, problem-plagued Viper have been demanding that the Army test it against cheaper European-made light anti-tank weapons.

Through it all, the service maintained that the Viper, a shoulder-fired, shoot-and-discard weapon whose cost had grown from $78 to $1,200 per copy, was superior to its competitors.

When the tests were completed in July, however, the Viper failed to meet the baseline standards set by the Army. According to an Army spokesman, when current contracts with the builder, General Dynamics, are canceled, $250 million will have been spent over the past 10 years for development and initial production of the Viper.

The Army now plans to purchase up to 1,000 rounds of the Swedish AT-4 to carry on design and operational testing to determine if it will be the new standard anti-tank weapon for infantrymen. "We have made no commitment to procure" the Swedish weapon, the spokesman said.

Initial criticism of the Viper emerged in 1981, when the House Appropriations subcommittee on defense complained about its high cost and various problems, including a tendency toward explosions at the rear end of the launching tube during test shots. Despite such complaints, the Army sought and received $90 million from Congress in 1980 and 1981 to procure 60,000 Viper rounds.

At that time, the service planned eventually to buy 950,000 rounds at a cost of more than $1 billion.

By 1982, however, congressional critics were strong enough to block an Army request for $130 million for Viper and instead demanded the shootoff.

Army support for the program diminished earlier this year when a production Viper round from the initial run at General Dynamics exploded. The service then stopped production to allow the contractor to determine the cause of the accident and await the results of the competitive evaluation with other similar weapons.