A D.C. police department program to reduce crime in stores, banks and carryout restaurants, which Mayor Marion Barry declared was "one of the greatest programs the police department has ever had," has been curtailed because the department says it is too costly.

The program, begun last May, involved hundreds of police volunteers who posed as clerks, cooks, customers and bystanders at places where robberies have occurred, or where police thought they were likely to. About 80 undercover officers were planted each night, six nights a week, in businesses around town.

The result was arrests in nine incidents where people were allegedly trying to rob the places police were staking out. Even more significantly, police say, street knowledge of the stakeouts led to a sharp drop in the number of crimes at commercial establishments.

But the program was also expensive: the officers were paid overtime rates, averaging $16 an hour. By last Friday, when the department decided to cut back drastically on the number of stakeouts, the department had spent about $123,000 in this extra effort to reduce holdups.

The decision to cut back on what police felt was a very effective law-enforcement tool comes at a time when the mayor has pledged to make crime reduction a cornerstone of the next four years of his administration, assuming he wins the general election on Nov. 2.

Barry told a group of businessmen last week that he has instructed Police Chief Maurice Turner to find ways to reduce the current crime rate to 1978 levels.

Assistant Police Chief Marty M. Tapscott, in explaining the decision to cut back on this particular crime- fighting effort, said: "The plant detail is a very costly program. We can't run it every day all year long, but we're not pulling out totally. We will be out there planting places at any time, without warning." He said the teams would be back on duty at least for the Christmas holiday season.

"It has been quite effective, but we have had to pull back for the moment; we've got to get our budget together," Annette Samuels, the mayor's press secretary, said yesterday. "The mayor is looking at all ways in which we can reduce crime and what monies are available to put into that effort."

The program, understandably, proved particularly popular with businessmen, who found themselves with free police protection. Sometimes officers waited in booths, sipping coffee; other times they tended french fries, a pistol tucked under an apron.

"These stakeouts are the best thing the police department has ever done; it would be a shame if they discontinued the program," said James Curtis Jr., a senior officer of the Holly Farms restaurants, which was the most frequently robbed fast food chain in the city last year, according to police.

Curtis said that robberies at Holly Farms have declined 25 percent since the department began the mass stakeouts.

Police officials said they cannot measure the success of the undercover operation by statistics, since figures were not kept last year for robberies of commercial establishments.

But Capt. Thomas Novak, head of the robbery squad, said figures this year show that the percentage of commercial robberies compared to all robberies is substantially lower than what he believes they were in past years, when commercial robberies accounted for about half of all robberies.

While most of the overtime work proved uneventful during the five-month program, some officers found action.

On July 2, for instance, officer Thomas Childs was helping box chicken dinners at the Church's Chicken restaurant, 1653 Benning Rd. NE, when a man pushed his way through a crowd of customers, snatched money from the cash register, and ran out of the store.

Childs jumped over the counter, identifying himself as a policeman, and took off after the fleeing suspect, police said. The robber kicked off his sandals to run faster, and disappeared down an alley, with Childs in pursuit.

Childs found a group of men milling around a corner a short distance away. He noticed that one of the men, pretending to ignore him, was barefoot. Childs arrested that man, and store employes identified him as the robber, police said.

Police have for some time planted officers in businesses on a spot basis, but dramatically increased that effort this spring at the behest of Barry.

The mayor announced in March that he was directing the police department to increase the number of officers on the streets in many ways in order, as he put it, to send a message to criminals. Increasing the number of officers on stakeout duty was one way the department responded to that directive.

The announcement came two days before Barry announced that he was running for reelection. During the mayoral primary race, the stakeout program was widely heralded by the mayor and top police officials.

Barry, at a press conference on Aug. 27, said: "It's probably one of the greatest programs the police department has ever had. It's cut down crime considerably, and everybody likes it--the police make extra money and the store owners feel safer."

Mayoral candidate John Ray accused Barry of using the stakeout program "as an election-year ploy" designed to make crime statistics look better. "All of a sudden, in the middle of his reelection campaign, the mayor discovers we have a robbery problem so the stakeout operation begins," Ray said in a Sept. 9 press release.

Ray, interviewed after the program was curtailed last Friday, said he was not surprised. He said he thought all along it was politically inspired.

A Barry spokesman, Ed Meyers, said that the mayor would have no comment on Ray's remarks.