The Federal Bureau of Investigation is on the verge of scrapping a $170 million computer overhaul that is considered critical to the campaign against terrorism but has been riddled with technical and planning problems, F.B.I. officials said on Thursday.

In a last-ditch effort to save the program, the bureau has hired a research firm at a cost of $2 million to evaluate the mounting problems in creating a ''paperless'' work system and to determine whether any parts of the project can be salvaged, officials said. One idea under strong consideration is for the bureau to use off-the-shelf software instead of the expensive customized features it has unsuccessfully sought to develop.

The development is a major setback for the F.B.I. in a decade-long struggle to escape a paper-driven culture and replace antiquated computer systems that have hobbled counterterrorism and criminal investigations. Robert S. Mueller III, the bureau's director, along with members of the Sept. 11 commission and other national security experts, have said the success of that effort is critical to domestic security.

''It's immensely disappointing to learn of this type of failure,'' Lee H. Hamilton, the vice chairman of the Sept. 11 commission, said in an interview. ''The F.B.I. cannot share information and manage their cases effectively without a top-flight computer system, and we on the commission got assurances again and again from the F.B.I. that they were getting on top of this problem. It's very, very disappointing to see that they're not.''

While other intelligence agencies like the C.I.A. and the National Security Agency developed sophisticated and secure computer systems long ago, the bureau has been much maligned for years for its failure to develop a modern system. Members of Congress have joked that their grandchildren could send e-mail messages and search databases more easily than F.B.I. investigators could.

Among other problems, officials blame technical and financial missteps, a rapid turnover among the bureau's information-technology personnel, difficulties in developing a system that is both secure and accessible to investigators, and, perhaps most critically, a resistance among some veteran agents who favor pens and pads over computers.

''I am frustrated by the delays,'' Mr. Mueller said Thursday in Birmingham, Ala., according to The Associated Press. ''I am frustrated that we do not have on every agent's desk the capability of a modern case-management system.''

The bureau said that it had made some significant inroads in the last few years in overhauling its computer capabilities, with the installation of 30,000 new desktop computers and the development of a secure, high-speed network.

But the F.B.I's ''virtual case file'' system, the last in a three-part computer upgrade totaling more than half a billion dollars, has proved the most difficult. The system was designed to give the bureau's nearly 12,000 agents around the country instant access to F.B.I. databases, allowing speedier investigations and better integration of information both within the bureau and with other intelligence agencies that must coordinate national security matters.

But the project is over budget and behind schedule, and F.B.I. officials acknowledged on Thursday that they were uncertain whether it would ever be completed. Only about 10 percent of the project, delivered by the Science Applications International Corporation of San Diego, is now in use, officials said.

A draft report from the Justice Department's inspector general, first reported last month by the industry publication Government Computer News and again on Thursday by The Los Angeles Times, concluded that the case file system as now designed and conceived would not work and could not be put into use.

A senior F.B.I. official, who gave reporters a formal briefing on the issue on Thursday on the condition of not being named, was not willing to go that far but acknowledged ''a number of deficiencies'' and frustrations in the project and said, ''The application, the way it's built now, is under evaluation.''