PITTSBURGH (AP) _ A former FBI agent who infiltrated a drug ring says he took large kickbacks from drug dealers because he lost control of an undercover investigation that pitted him against both international cocaine smugglers and FBI bureaucrats.

''I had just given up,'' Daniel A. Mitrione Jr., 38, testified Thursday in the trial of Hilmer B. Sandini, 61, of Coral Springs, Fla., a convicted con man who earned $800 a week as a paid FBI informant.

Mitrione and Sandini, who is charged with operating a ring that shipped Colombian cocaine through Miami to Pittsburgh, began the undercover operation in 1982 to infiltrate major drug networks but then began profiting from cocaine deals, authorities say.

Three Florida residents, including Sandini's wife and daughter, and five Pennsylvania men also are charged in the operation.

Mitrione is awaiting sentencing after pleading guilty in March to bribery, conspiracy and cocaine possession charges. He has admitted accepting $850,000 in bribes from dealers and stealing more than 90 pounds of cocaine from a shipment he was supposed to seize.

Mitrione said he set up an undercover drug business for the FBI with Santini in Fort Lauderdale, Fla., in 1982 after the con man agreed to become an FBI informant as part of a plea bargain.

On cross-examination by Sandini's attorney, G. William Bills, Mitrione said Thursday he was told about cocaine shipments but did not report the amounts to the FBI in an effort to continue the investigation.

''I believed in the case. I believed in the continuation (of the case) and I believed in the informant,'' Mitrione said.

In early 1983, Mitrione said, he failed to report to the FBI that Sandini had held back seven kilograms of Colombian cocaine from a shipment dumped into the Gulf of Mexico. Mitrione said he later accepted $150,000 to $170,000 in profits from the shipment.

''I started saying at that point, 'What the heck,''' Mitrione said during his second day of testimony in U.S. District Court.

''I was having discussions in the (FBI) office about continuing Operation Airlift. ... I was fighting the fact that I had compromised to a degree because I had accepted money. I had witnessed narcotics transactions and did not report them. I had completely lost control,'' he said.

Mitrione said he bought cars, silver and racehorses with proceeds from 42 kilograms of cocaine he sold after infiltrating the drug ring.

He said his transactions with Sandini ended in March 1983, but that later that year he realized he was under surveillance by other FBI agents and resigned on June 24, 1983.

He said he could not bring himself to reveal his activities until Nov. 3, 1984.

''I could no longer live with what I had done. It was high time to confess what I'd done,'' he testified.

Sandini has said that Mitrione became bitter about law enforcement when Justice Department officials refused to allow 1,000 kilograms of cocaine to enter the country, preventing arrests Mitrione felt could have been made.