It was an offhand remark by a District of Columbia policeman to an FBI agent early this year -- a tip that the policeman did not expect would be followed up -- that led eventually to the dramatic court appearance of Republican Congressman Robert E. Bauman on charges of soliciting soliciting sex from a teen-aged boy.

The remark was but one of a series of extraordinary occurrences -- some the result of law enforcement work, some of the congressman's own making and some simply because he is a high-ranking public official -- that resulted in Bauman's public ordeal.

According to law enforcement sources interviewed this week, the ultimate irony in the sex solicitation charges against Bauman is that they probably never would have been made if left in the hands of the D.C. police alone. For all practical purposes, the police do not investigate alleged misdemeanors involving homosexuals, nor do they follow up on specific complaints.

The case against Bauman, according to a number of federal law enforcement officials, began last February when a D.C. policeman reported to the FBI a tip from an informant that Bauman allegedly had been soliciting sex from boys in the bars of Washington's homosexual community.

The policeman told FBI agents that he did not expect the tip to be acted on since it involved a congressman, these sources said. The FBI noted the tip, and in the following weeks became more and more interested in it for two reasons:

Some of the people named in the early allegations involving Bauman's conduct may have been related to an investigation the FBI was conducing into the commericalization of child pornography.

One of the allegations involved a report that Bauman had solicited sex from a youth he then had taken from the District of Columbia to Maryland -- a possible interstate violation.

Normally the FBI's Washington field office does not get involved in simple solicitation of sex cases within the District of Colubmia, but these two factors prompted the agents to probe further.

As the agents reported what they were learning about Bauman to the major crimes section of the U.S. Attorney's Washington office, which was handling the child pornography investigation, they received the go-ahead from assistant U.S. Attorney Carol E. Bruce to press ahead.

During that investigation, the policeman told the agents that confidential sources he had befriended in the homosexual community had alleged that Bauman had solicited and paid for the sexual favors of a 16-year-old who was nude go-go boy at the Chesapeake House Restaurant at 746 Ninth St. NW.

The 16-year-old agreed to become a complainant -- unusual because lawmen seldom recieve such complaints -- and FBI agents in the ensuing summer months interviewed scores of witnesses to establish the boys credibilty. s

They were told that Bauman for months had been soliciting sex from teen-agers in Washington's gay community, driving from bar to bar in his personal car with its congressional license plate. Several witnesses told the FBI that they saw Bauman meeting with boys and overhead his alleged sexual approaches.

Charles F. C. Ruff, U.S. Attorney for the District of Columbia, said it was he, after reviewing information supplied by the FBI, who decided to bring formal charges against Bauman. Ruff said he informed his superiors at the Department of Justice of the action. Sources said a 23-page FBI report summarizing information gathered by the agents also was sent to FBI headquarters.

Last week, in D.C. Superior Court, Bauman pleaded not guilty to a charge of soliciting sex from the 16-year-old. The plea was part of a special arrangement with prosecutors that called for Bauman to enter a "first offenders" counseling program for six months, spending time with a therapist assigned to deal with personal problems. Bauman has said he has had an alcoholic problem and encounters homosexual compulsions. Upon successful completion of the program prosecutors will drop charges against him.

Some leaders of Washington's gay community expressed concern this week that the charge against Bauman may reflect the beginning of a wave of persecution of homosexuals. Police in the District of Columbia have not investigated alleged homosexual misdemeanors since the old Prostitution and Perversion squad was disbanded in 1976, partly as the result of pressure from gays on the City Council and police department.

"There are no attempts to make cases; we don't go into bars, we don't patrol Ninth Street -- we have no interest in what whatever," said Sgt. Alan Simmers, who is assigned to what is left of the "P and P" unit, with is now stationed at 3rd District headquarters, 1624 V St. NW. Simmers said there is an unwritten understanding among officers for at least the last five years not go after gays.

Federal officials insist they have no intention of beginning any widespread enforcement efforts in the homosexual community. In the last year, the Washington FBI office has made only about a half-dozen sexual solicitation cases invoving males, all of them because there were interstate connections.

Law enforcement officials said this week that the case against Bauman, at it developed, was so strong that they had no choice but to week prosecution. a"You had a man who was soliciting six from boys in bars in Washington," said one source close to the prosecution. "He had done it before and he would do it again. You just couldn't walk away from that."

Ruff emphasized in an interview this week that he thought the investigation was "professional and straightforward." In response to a question he said politics were "absolutely not" a factor in making a determination to prosecute. He said Bauman was treated as any other citizen. d

But the fact that Bauman was a member of Congress guaranteed that the case would receive special prosecutorial attention -- Ruff himself admitted he would not normally be involved in soliciting cases -- and the resultant publicity made it clear that he was not just an average Joe going through the system.

Most first offenders charged with the same crime simply enter a special offenders program that calls for them to observe six hours of court proceedings and write a 1,000 word eassay on what they had learned. The accused never meets a prosecutor, but instead deals with a low-level clerk. They can complete this first offender program in one or two days, according to court sources.

Bauman evidently never had this option, according to these sources. Had he tried to slip through the crininal justice system unnoticed, reporters surely would have been tipped off to it, and he would have been left to scramble for a defense, court sources said. "You got a congressman on a sex charge -- I probably would have tipped you off myself," said one senior court official.

At it was, Bauman's attorney worked out a special program with prosecutor Bruce in advance of his arraignment last Friday that calls for six months of counseling. Reporters were tipped off in advance of the arraignment, anyway, and an army of them awaited him following his court appearance. He escaped by speeding off in a government car.

Bauman, in statement released to the press, maintained that he had suffered from "acute alcoholism" and that he would receive treatement during the six-month counseling program under court supervision. The arrangement had been worked out with prosecutor Bruce.