A Peruvian laboratory's failure to sterilize a batch of at least 50,000 Mediterranean fruit flies caused the June outbreak of the rapacious insect in California, the state Medfly project director has concluded.

An official of the U.S. Agriculture Department, which recommended the use of the sterile flies, immediately contradicted the statement of Medfly official Jerry Scribner. The Agriculture spokesman said the outbreak may have been accelerated instead by the failure of a system of dyes designed to distinguish sterile from non-sterile flies.

The controversy over the origins of the outbreak burst forth today as the seven-county Medfly infestation in California seemed under control, at least temporarily. Officials shaken by the political fallout from the insects spread have been looking for someone to blame, and Scribner's boss, California Gov. Edmund G. (Jerry) Brown Jr., a target of criticism, in speeches and interviews has been identifying the non-sterile Peruvian flies as the culprits.

In a memo to California Food and Agriculture Director Richard E. Rominger, released today, Scribner said his staff, unaware that the Peruvian flies were still fertile, released them on purpose June 14 as part of the effort to wipe out a small Medfly infestation discovered last year on the San Francisco peninsula.

California officials have released more than 4 billion sterile Medflies in the infested area to disrupt the life cycle of the wild, fertile flies and to test the effectiveness of an aerial spraying program. The fertile flies mate with the sterile ones without producing fertile eggs.

Medfly project spokesman Annie Zeller said the Medfly staff made a spot check of a Peruvian shipment of 10 million flies, but failed to catch the cannister with 50,000 flies Scribner says he feels were fertile.

Nearly two weeks after the release of the Peruvian batch in an area of Mountain View, Calif., unusual numbers of Medfly larvae were found in or near the same area, indicating that fertile flies had laid eggs, which hatch in three days, very recently.

In his memo Scribner noted that 118 of 122 larvae found were in or adjacent to the area where the Peruvian cannister was released.

Scribner also noted that two flies marked with the yellow dye denoting the Peruvian laboratory were later dissected and found to be fertile, egg-bearing females. "Based on the evidence, I have no doubt whatsoever that at least 95 percent of the 1981 infestation is directly attributable to the release of non-sterile Peruvians," Scribner said in his memo, dated Monday.

Scribner made a similar statement to reporters in mid-July, and the only additional evidence in his memo appears to be the results of the August dissection of a second Peruvian fly. But he has never before stated his case in such strong terms or attempted to give it such publicity.

King Lovinger, a spokesman for the U.S. Animal and Plant Health Inspection Service in Washington, tonight repeated criticisms he had made of Scribner's original statement in July.