Early last summer, Stanislav Borisovich Gusev, a technical expert who was nearing retirement from the Russian Foreign Intelligence Service and who had arrived in Washington in March, drove downtown in a car with Russian diplomatic plates and searched for a parking space within sight of the State Department.

According to U.S. officials, Gusev did this regularly for months, parking and reparking his car while carefully feeding meters to avoid tickets. Then he would use equipment in his clothing to activate an eavesdropping device planted inside the State Department, which transmitted conversations from a conference room on the sensitive seventh floor to recording equipment in Gusev's car.

Over time, U.S. government officials said, Gusev monitored 50 to 100 meetings that took place just outside the "mahogany row" of offices belonging to the secretary of state and her top deputies.

For weeks after discovering the device, the FBI and State Department used the conference room to feed disinformation to Gusev and keep luring him back, officials said. But at 11:34 a.m. Wednesday, the FBI detained Gusev--and the game ended.

U.S. officials said it was the first instance of the State Department discovering a foreign eavesdropping device planted in its own headquarters, and the sophistication and daring of the effort was startling. A government official said that planting the device was "not a one-time installation" and required someone to survey the room, measure it, perhaps photograph it, and then construct something that concealed the device from view.

FBI and State Department security officials said that the breach of national security was serious, and that they are still trying to figure out when the device was planted and by whom. They also are poring over months of meeting logs to measure the damage done before the bug was uncovered.

"This is not only a story of effective counterintelligence . . . it's also a very important story of the aggressive activity of Russia's intelligence presence inside the United States," said Assistant FBI Director Neil Gallagher, who heads the bureau's national security division.

The incident will further test U.S.-Russia ties, already strained by U.S. criticism of Russia's military offensive in Chechnya and Russia's refusal to agree to U.S. plans to develop a national missile defense system.

"No one is surprised that there is a Russian intelligence effort that targets the workings of the U.S. government," said a senior State Department official. "But it is not a pleasant thing when there is a penetration on the secretary of state's floor, and it is obvious that one element of our response is going to include anger. . . . People are genuinely angry."

The espionage discovery prompted calls from Congress for tougher security measures. "Anyone who thought the Russians had left the espionage business at the end of the Cold War is badly mistaken. Clearly they have not given up dirty tricks and spying," Rep. Porter J. Goss (R-Fla.), chairman of the House Permanent Select Committee on Intelligence, said yesterday. "Not only is this damaging to our national security, but it also does serious harm to our working cooperation with the Russians on many other necessary matters."

Gallagher said that an FBI counterintelligence team on a different case recognized Gusev outside the State Department in early summer and that Gusev's movements "wouldn't have drawn unusual attention, either by [the] State Department or the ordinary citizen walking back, seeing someone walking up on a sunny day for an hour or so."

But he said FBI officials began tracking Gusev's activities, which they first interpreted as an effort to make a technical survey of the State Department building and later as an effort to find the best spot for receiving transmissions from the eavesdropping device. "His pattern of activity was such that sometimes he would park his car, [then] move his car around the block and come back to another location," Gallagher said. "It appeared to us that he was trying to position his car in an ideal location."

During the summer, the FBI borrowed equipment from other government agencies and began to hunt for a transmitter inside the State Department, trying to avoid attracting attention in case Gusev was getting help from someone inside the building. "It was literally attempting to find a needle in a haystack," Gallagher said.

Security officers spent weeks going from corridor to corridor with equipment resembling Geiger counters. Because the transmitter sent bursts of information only when Gusev turned it on, the FBI could not search unless he was roaming the neighborhood.

The device wasn't found until early fall, a government official said. Although the seventh floor is the most sensitive, the official said the State Department also viewed it as the most secure, so it was left for last.

After the bug was uncovered, State Department officials and others intentionally fed the Russians disinformation, sources said. "We left the device in place," Gallagher said. "We took steps to minimize any loss that would result from its continued presence in the State Department."

Although State Department officials said yesterday the device wasn't in the corridor of suites where the secretary's office is located, it was nearby. Before the discovery of the bug, a variety of high-level State Department officials held discussions in the room, other government officials said.

State Department diplomatic security officials did "a very, very aggressive sweep" and failed to find any additional devices, according to David Carpenter, assistant secretary of state for diplomatic security.

FBI officials said they do not believe that Gusev had "inside information" that drew him to the State Department at certain times; his appearances outside the building were "sporadic," they said.

They also said they had no record of Gusev ever entering the State Department. From their surveillance, FBI officials said, Gusev apparently recorded conversations and adjusted technical equipment during his visits. It also appears that the listening device planted inside the State Department was used during his visits and not at other times, officials said.

The tiny bug inside the State Department probably was installed by Russian agents who took advantage of lax security, a U.S. official said, adding that it would have taken considerable time to install the listening device.

"It was an extremely sophisticated device and was professionally introduced into the State Department," said Gallagher, adding that it was a device U.S. law enforcement officials had never seen before and were still analyzing. "It's just not slapped on here. . . . You would not--the ordinary person would not see it," he said.

Officials from the FBI and the State Department's Diplomatic Security Service publicly hailed each other's cooperation yesterday, but a government official involved in the case said later that there was tension between the two. The FBI wanted to monitor Gusev and try to learn more about his technology and contacts, while the State Department was anxious to detain Gusev and prevent further breaches of department security.

The State Department only recently began tightening its building security. Visitors to the building had been allowed unescorted access until this fall, U.S. officials said. State Department officials said yesterday that while they routinely sweep certain areas for bugs, they have been working with limited resources.

"We do have limitations," said Carpenter, the assistant director for diplomatic security. "This is a big building."

Russian officials said the detention and pending expulsion of Gusev seemed a direct response to events in Moscow last week, where a U.S. Embassy official was ordered to leave the country after being detained and accused of spying.

But U.S. law enforcement officials insisted yesterday that the two episodes were unrelated.