The Justice Department dropped an indictment of General Dynamics Corp. over the Divad antiaircraft gun after discovering military and company documents that blew a major hole in its theory of prosecution, the head of the department's criminal division said yesterday.

"The government is standing up and saying, 'We were wrong,' " Assistant Attorney General William F. Weld told a news conference.

Weld said it is "unusual for the government's view of the facts to change so radically that the government will abort the prosecution." But he said that it would have been "dishonorable" to do otherwise. "Nobody is happy about this," he said.

The dismissal of the fraud charges, requested by the government late Friday and approved by a federal judge in Los Angeles yesterday, came nearly 19 months after the indictment of General Dynamics and James M. Beggs, then head of the National Aeronautics and Space Administration. The charges forced Beggs, a former company vice president, to resign from NASA.

"I really feel aggrieved on this," Beggs said yesterday. "I was left hanging out to dry. I feel the grand jury system is no longer a check on the prosecutors."

Beggs complained that Justice Department lawyers refused to talk to him or General Dynamics officials before the indictment was brought in December 1985. He said the indictment was brought in part because "there is strong political motivation to go after defense contractors these days."

Beggs said his vindication "took much too long . . . . It was expensive to live for 19 months without a job."

Asked if the government should apologize to Beggs, Weld said he would "decline the invitation to embrace the language of apology" because the department acted in good faith.

He said Beggs and General Dynamics, the nation's largest defense contractor, "would have to trust the fairness of public opinion to understand" that there is "no blemish" on their reputations when charges are dropped.

The department's action, coming several weeks after it dropped a three-year fraud investigation of General Dynamics submarine contracts, prompted renewed criticism in Congress.

"The dropping of the second General Dynamics case shows there's something drastically wrong with the way the Justice Department handles defense fraud cases," said Sen. William Proxmire (D-Wis.). "Justice's incompetence . . . must be called into question," said Sen. Charles E. Grassley (R-Iowa).

The indictment involved a $39 million Army contract to develop a prototype antiaircraft gun from 1978 to 1981. General Dynamics lost the competition to build the weapon, also known as the Sgt. York, and the Defense Department canceled the weapon in 1985 after repeated test failures.

The indictment charged that General Dynamics tried to hide $7.5 million in Divad cost overruns by illegally shifting excess costs to two overhead accounts.

Weld said the government believed the company had a "fixed-price" contract with a firm ceiling, but later became convinced that it required only the company's "best efforts" to stay within the ceiling and allowed more flexibility in charging overhead costs than prosecutors originally thought.

The department changed its position after examining 82 boxes of Army and company documents that General Dynamics obtained under a Freedom of Information Act request, Weld said. He said Justice did not obtain the material earlier because of bureaucratic lapses.

After examining the new material, the department conducted additional interviews -- both with experts and with individuals involved in the original General Dynamics-Army negotiations. As a result, nine of the 10 career prosecutors in the case recommended dismissal, Weld said.

Weld said the indictment also erroneously assumed that General Dynamics had to deliver a finished weapon. He said it was hard to believe the contract could have allowed the company to spend $39 million, "and if they failed they could deliver a bucket of bolts."

Vincent Fuller, Beggs' attorney, said the Justice Department "ran amok" in the case. He said he repeatedly failed to convince former fraud section chief Robert Ogren of the department's error, but prevailed after Ogren was succeeded by William C. Hendrix III.

"I don't think they had any choice but to drop the indictment," Fuller said.