The Counter Spy shop at 18th and K streets NW has all the equipment the modern secret agent needs to go into business. From invisible ink to telephone-bug detectors to a briefcase rigged with concealed tape recorders, the boutique-like store offers wealthy business people and foreign diplomats the latest in surveillance and security devices.

The owner of the store and several others like it around the world is Ben Jamil, a New York businessman who claims his company is the largest of its kind in the world.

But while building his international counterspy empire, Jamil also has led a double life, according to court documents that recently became public. After a 1981 indictment for allegedly violating U.S. export-control laws, Jamil became a secret informant for a government "sting" operation that sold spy equipment to foreign agents, the documents disclose.

Jamil allowed U.S. Customs officials to wire his New York headquarters with audio and videotape equipment while he conducted numerous business deals with buyers representing Libya, the Soviet Union and other nations in 1982 and 1983, the documents said.

These deals, which were arranged by Jamil under instructions from U.S. agents, led to at least six federal investigations into allegedly illegal exports of military and other espionage equipment, including naval attack boats, electronic debugging devices and "false bottom" briefcases, according to the court records.

In exchange for Jamil's cooperation, federal prosecutors agreed in October 1983 to drop criminal charges accusing Jamil of allegedly illegal sales of equipment to Syria, Guinea, Switzerland and Greece, the records said. As part of the arrangement, Jamil's company, CCS Communications Control Inc., of which he is chairman and chief stockholder, pleaded guilty to the same charges and was fined a total of $10,000. Although Jamil declined to comment, his attorney wrote The Post saying that "at no time" had Jamil "agreed to conduct his regular business in such a way as to use electronic devices to record conversations with ordinary customers who come into the office . . . . Mr. Jamil has never been found guilty of any violations of the law."

Jamil's role as government informant -- and the details of his agreement with the Justice Department -- are contained in December 1983 documents that recently were placed on the public record in federal court in Brooklyn, N.Y.

These documents, which were unsealed at the order of a federal judge, include a letter from a government prosecutor outlining Jamil's role in six federal investigations.

Two of these investigations were described in the letter by assistant U.S. attorney David V. Kirby as being "extremely significant to our office," involving attempts by "hostile foreign powers" to purchase technology "critical to the security of the United States."

Government prosecutors said recently they could not cite any public indictments produced as a result of Jamil's efforts in those two cases. But they said Jamil had been helpful in developing two other cases that have become public. One of them involves a New York arms dealer who was charged this year with an allegedly illegal attempt to ship machine guns to Poland and military "night vision" devices to Argentina during the Falklands War.

Prosecutors also declined to say whether Jamil still is serving as a government informant, but they acknowledged they did not oppose an order by U.S. Judge Jack B. Weinstein to place the documents in the court's public files.

"It may at this point look from the outside like it was a bad bargain, but I don't think so," said Kirby when asked about the use of Jamil as an informant. "We may have to sit here and take our lumps on that . . . . But time will tell. Not all the cards are in."

One Justice Department official said the government's bargain with Jamil also could be justified on the grounds that the original case against him "was not that significant."

"The type of equipment he was shipping was pretty unsophisticated," this official said. "It was routine electronic stuff that was repackaged . . . . So the trade-off in those terms was pretty valuable," the official said.

According to a memorandum submitted by Jamil's lawyers to Weinstein, one of the items exported by Jamil originally was designed as a tool for television repairmen and was repackaged and marketed by CCS as a bug detector.

Jamil's agreement to become an informant was so secret that one of his key partners was unaware of it, the partner said. Contacted in his New York office, Jamil declined to comment and, through a spokeswoman, directed a reporter to talk to CCS President Carl Lande.

Reached in London, Lande said he had no knowledge about Jamil's work for the government and didn't realize the firm's New York headquarters had been bugged by federal agents.

"I was not aware that our conference room was wired," said Lande. "But if what you're telling me about Mr. Jamil is true, I say, good for him.

"For an undercover operation to become public like this, I find it mind-boggling," Lande added. "Why would you want to expose such a thing?"

Long considered among the leading U.S. marketers of security equipment, Jamil has built CCS into a multimillion-dollar operation that, according to Lande, is probably the largest firm of its kind in the world. The company says that its clients have included federal agencies, foreign governments in the Mideast, Central America and Africa, and a host of wealthy businessmen, such as Saudi arms dealer Adnan Khashoggi.

The Washington shop, which is in the lower lobby of the office building at 1801 K St. NW, consists of a small showroom lined with glass cases displaying some of Jamil's wares. Among its more exotic offerings has been an antiterrorist Mercedes limo whose features include a bulletproof exterior, steel reinforced bumpers for ramming, flip-down gun portals, remote ignition control, and a protective system that surrounds the car with tear gas when under attack. Lande said, depending on what options are chosen, the car can cost up to $250,000.

Jamil has attracted controversy in the past. CCS's contract to be the official security supplier to the 1980 Winter Olympics in Lake Placid, N.Y., was canceled after an investigation by the New York State Select Committee on Crime. In a January 1980 report, the panel alleged that a now-bankrupt company operated by Jamil in the 1970s had borrowed money from a firm said to be a front for an organized crime figure.

Jamil's attorney, Jonathan W. Lubell, wrote to The Post that "neither Mr. Jamil nor any company of his has ever had any relationship with organized crime, nor has Mr. Jamil knowingly had any connection with any company which, in turn, has been described as having a connection with organized crime. If in the course of his business activities Mr. Jamil has had any legitimate transactions with a company later described as having a connection with organized crime, he is in a position of many thousands of other innocent businessmen."

In March 1979, the U.S. Customs Service seized products being shipped by CCS at Kennedy Airport, according to the court documents. That raid led to Jamil's 1981 indictment for selling a number of military and counterespionage devices to foreign interests in violation of U.S. arms and export-control laws, according to the court documents.

While the charges were pending, Jamil offered to provide prosecutors with information about a representative of the Libyan government who had approached him about smuggling military training devices to that country, according to the 1983 letter by assistant U.S. attorney Kirby to Judge Weinstein. The offer led to the negotiated agreement in which the government dropped its charges against Jamil, the court documents said.

As part of the agreement, the U.S. Customs Service set up a "sting operation" and installed hidden video cameras and microphones in a conference room in Jamil's New York office, the letter states. Jamil also supplied customs agents with a small adjacent room to monitor his contacts, the letter adds.

In a Dec. 12, 1983, memorandum in the public files, Jamil's lawyers said that in one instance, Jamil arranged meetings in his office with two businessmen seeking to buy computer-controlled tank target and rifle target training systems for the Libyan military.

In another instance, the memorandum said, Jamil arranged contacts with an Italian distributor who was seeking to purchase a military attack boat for Libya and other high-technology equipment for the Soviets.

And in a third instance, the memo said Jamil arranged to sell a "false bottom" briefcase to an alleged international currency smuggler.

There are no public indictments that match these descriptions of the operations Jamil worked on, government prosecutors add.

But according to a Justice Department official, Jamil did play a "significant" role in developing the case against HLB Security Electronics Ltd., a New York arms-dealing firm indicted earlier this year for attempting to illegally export 400 machine guns to Poland and other military equipment to Argentina during the Falklands War.

In June 1983, an executive of the firm approached Jamil and told him the company had the means to supply military "night-vision" devices to any part of the world without the required U.S. State Department licensing, according to an indictment against the firm. The indictment refers to an undercover informant that a government source has identified as Jamil.

At that point, Jamil arranged a series of meetings with the arms dealer that were secretly recorded by federal agents, according to the indictment and a government source. Acting on instructions from the agents, Jamil also placed a bogus order with HLB for 400 night-vision goggles to be shipped to West Germany for ultimate delivery to the Soviet Union, according to the indictment and a government source. HLB then arranged to ship a sample of the goggles to West Germany, the indictment alleged. This act became the basis for one of the charges against HLB. The company pleaded not guilty to the charges.

Jeffrey Weisenfeld, a lawyer for HLB, said that prosecutors have turned over several audio tapes and transcripts that federal agents made of conversations between Jamil and one of the firm's executives. HLB and its executives "deny all the charges, and there will be a trial," Weisenfeld said.

Staff writer Michael Isikoff contributed to this report.