A five-year-old investigation of underworld bribery of the FBI culminated yesterday in the indictment of an FBI agent in New York on charges of lying about the alleged bribe.

The indictment of special agent Joseph Stabile marks the first time in the bureau's 54-year history, the Justice Department said, that an agent has been indicted for collusion with organized crime.

Stabile was charged with two counts of prejury before a Brooklyn grand jury that was questioning him about a $10,000 bribe he allegedly received from John Caputo to arrange for the dismissal of gambling charges against Caputo.

Caputo, 74, has been identified by the FBI as a member of the Luchese family, a New York branch of the Mafia. He is currently serving a jail term for contempt for refusing to answer questions about the Stabile case.

Stabile testified before the grand jury on Sept. 17, 1973, but it adjourned without charging him. An internal FBI investigation then recommended that the case be dropped, and Stabile continued on active duty with the bureau.

The case was reopened when the Justice Department reviewed it again last fall, department officials said. The result was yesterday's indictment, which came two days before the statute of limitations for perjury would have run out.

The case has been a matter of concern to FBI officials over the years. Despite all the other allegations of FBI wrongdoing that have surfaced in the past decade, the agents' image as "untouchables" - beyond the reach of bribes - has remained intact.

The Washington Post reported in 1975 that former FBI director Clarence M. Kelley tried to stop a Justice Department investigation of the Stabile case because it would mar the "untouchable" image and because it would further impair bureau morale.

Henry E. Petersen, who headed Justice's Criminal Division when the Stabile case was pending, told The Post that Kelley wanted the investigation stopped. The Justice Department denied, however, that Kelley had interceded in the investigation.

The department went out of its way yesterday to draw attention to the indictment. Reporters were alerted that a "newsworthy" indictment was pending, and a detailed copy of the charges against Stabile was telecopied to Washington for waiting reporters.

Justice said Stabile is the first active-duty special agent to be charged with a federal crime. But he is not the first to run into legal trouble involving his work with the agency.

Former acting FBI director L. Patrick Gray and two of his top aides are under indictment for approving illegal break-in by FBI agents. Former agent John P. Dunphy resigned from the bureau in 1976 hours before pleading guilty to misdemeanor charges of using government property to make home improvements for the bureau's first director, J. Edgar Hoover.

Hoover, who directed the FBI starting in 1924, took enormous pride in teh agency's reputation for integrity, and he insisted that agents stay away from any arrangement that might be considered collusion with crime figures.

Hooever died in May 1972, a few months before the Justice Department began its first investigation of the bribe allegedly paid to Stabile.

The indictment issued yesterday says that Stabile, 50, who joined the bureau in 1962, was working on a Joint investigation with the New York City Police of Caputo's gambling activities.

The indictment charges that he told another FBI agent that he and a police sergeant had split a $15,000 bribe from Caputo to see to it that Caputo's gambling charge was dropped. Stabile said he got $10,000, the indictment says.

It indicates that Caputo had served as an informant for Stabile in other gambling cases.

The agent whom Stabile told about the bribe passed the information on the Justice Department, the indictment indicates. When Stabile was asked about his statements to the other agent, he denied making them and denied receiving any money from Caputo.

Those two denials constituted the two counts of the perjury indictment.