When arson investigators in Houston needed help restoring a damaged surveillance tape to identify suspects in a fatal fire, they turned first to local experts and then to NASA. With no luck there, investigators appealed to the owner of one of the most advanced crime labs in the country: Target Corp.

Target experts fixed the tape and Houston authorities arrested their suspects, who were convicted. It was all in a day's work for Target in its large and growing role as a high-tech partner to law enforcement agencies.

In the past few years, the retailer has taken a lead role in teaching government agencies how to fight crime by applying state-of-the-art technology used in its 1,400 stores. Target's effort has touched local, state, federal and international agencies.

Besides running its forensics lab in Minneapolis, Target has helped coordinate national undercover investigations and worked with customs agencies on ways to make sure imported cargo is coming from reputable sources or hasn't been tampered with. It has contributed money for prosecutor positions to combat repeat criminals, provided local police with remote-controlled video surveillance systems, and linked police and business radio systems to beef up neighborhood foot patrols in parts of several major cities. It has given management training to FBI and police leaders, and linked city, county and state databases to keep track of repeat offenders.

The efforts are part of a trend in corporate donations directed at solving societal problems. "Target is pushing forward a different model of corporate giving," said Douglas G. Pinkham, president of the nonpartisan Public Affairs Council. Others are doing the same. Exxon Mobil, for example, is building hospitals in the developing world. Cargill Corp. is building schools in areas where potential employees lacked basic skills.

Target's law enforcement efforts date back at least a decade but intensified after the Sept. 11, 2001, terrorist attacks. The company has applied in-store practices, such as inventory-tracking technologies, to the business of identifying and locating criminals. "In many ways, Target is actually a high-tech company masquerading as a retailer," said Nathan K. Garvis, Target's vice president of government affairs.

Some people note the possible ethical complexities inherent in Target's tight government relationships. "It is a tricky issue when firms get too close to government," said Ernesto Dal Bó, assistant professor of business and public policy at the Haas School of Business at the University of California at Berkeley. Dal Bó sees such alliances as fraught with potential conflicts, though he cautions against alarm. "There is no reason we need to say that anything bad is happening, but we do need to watch," he said.

It is typical for big companies, especially retailers, to coordinate with law enforcement in safeguarding their properties. Wal-Mart Stores Inc., for example, takes a "one store at a time" approach, in which bicycles and other gear are given to law enforcement agencies in need, spokeswoman Sharon Weber said. "We are also very proud of our outreach program with police in some cities," she said. "We teach kids the true consequences of shoplifting."

Target's approach is more comprehensive. Target has replaced the concept of "assets protection" in its stores with crime prevention in the community. A program called "Target and Blue" defines its approach to philanthropy and partnership with law enforcement agencies.

Chief executive Robert J. Ulrich made cooperating with law enforcement a priority in the mid-1990s, when crime rates skyrocketed and his hometown of Minneapolis was nicknamed "Murderopolis."

"The turning point occurred for me when I read about a repeat offender walking out of the courtroom because the judge didn't know he had a criminal record in a different part of the state," Ulrich said in an interview. "He raped a woman the next day." Ulrich slapped the table. He said he wanted to know how the man got out of jail so fast.

Ulrich assigned Garvis to figure that out, and he began by interviewing police, judges and politicians to understand why one branch of law enforcement may not have access to another agency's records. He learned that city, county, state and federal criminal record systems had different ways of entering data and couldn't routinely share information.

"It struck me that following repeat criminals was really an inventory-management problem," Garvis said. He turned to the partnerships Target had already developed with law enforcement -- Target's assets protection group is headed by Brad Brekke, a former FBI agent, and is staffed by former police officers.

Working with local and state jurisdictions, Target donated what boiled down to tracking technology and database translation, as well as employees to work on the project. "This kind of thing has been tried before," said Richard W. Stanek, a former Minnesota public safety commissioner. "The extra thing that Target brought was neutrality -- and mediation. They physically brought the different arms of law enforcement together and helped get us talking." For several years, a database called CriMNet has been used in Minnesota in the prosecution of the felonies. It is one of several alternatives under consideration for a national criminal database.

As the project gained footing, Target investigators began working with law enforcement agencies in sting operations and surveillance concerning crime in their stores. Target began helping law enforcement on cases that had nothing to do with its business. It wasn't long before Target was analyzing criminal evidence for police, the FBI and the Bureau of Alcohol, Tobacco and Firearms.

"One of the nation's top forensics labs is located at Target's headquarters building in downtown Minneapolis," said FBI Special Agent Paul McCabe, who has worked with Target. "They have abilities and technology that far surpasses many law enforcement agencies in the country."

Target forensics investigators spend 45 percent of their time offering pro-bono assistance to law enforcement. Target declined to say how many cases that involves per year.

Visiting the forensics lab entails a trip to Target's corporate security department, past red-and-white bull's-eyes and up the elevator to the second floor. Through password-protected doors is a windowless room -- the desks packed with computers and flat-screen monitors, and a wall decorated with the badges from the law enforcement agencies that Target has helped. Motion-detection sensors linked to silent alarms sweep the ceiling above the locked evidence room, and only four employees have access to the facility.

The lab's first big outside criminal case was the Houston arson-homicide in 2004. Thomas D. Wood, a senior arson investigator for the Houston Fire Department, oversaw the case and was the first law enforcement official to use Target's lab.

A woman and two children died in the fire. A surveillance tape from a nearby convenience store showed what appeared to be two juvenile suspects buying gasoline hours before the fire, but the tape was damaged and Wood struggled to restore it. He happened to go to lunch with a Target investigator, who mentioned the forensics lab. Wood sent the tape the next day.

"Not only were the Target people able to clean the tape, they also made still shots from it that were used by the boys' school principal to identify them," Wood said. Both suspects confessed and are now serving prison sentences.

As word spread about what Target's lab had accomplished in the Texas arson case, the requests for help soon became overwhelming. "We had cops in here every day -- chairs pulled up next to my computer," said Target forensic investigator Craig Thrane. "We finally had to make criteria for the cases we take. The only ones we do now involve violent felonies."

At a work station in the lab, Thrane popped a videotape into a machine with 60 tiny knobs, then tapped a series of commands into his computer. "This is a video from a bank robbery that the FBI brought to me to try to figure out who the criminal is. In this case, it is a gun woman -- very unusual."

Thrane measured the robber's height electronically and zoomed in on some of her features. "Notice the space between the corner of her mouth and her lip -- there is something unusual about it -- I'm guessing she is missing teeth," he said, making several more measurements of unique characteristics that he sent to the FBI. A week later, word arrived that agents nabbed a suspect -- a 40-year-old woman who was a methamphetamine addict. "They also told me she lost her teeth," Thrane said.

Besides helping law enforcement solve crimes, Target has a prevention program called "Safe City." It began two years ago in a police precinct in Minneapolis and has spread to dozens of other cities including Washington, Boston, New York and Atlanta.

In the Washington area, Target is using Safe City at two stores in Prince George's County -- at Forestville Mall and P.G. Plaza, with increased cooperation between its own security officials and law enforcement in patrolling areas around the buildings.

Modeled after a community surveillance program in England, Safe City uses video and computer equipment to help police patrol neighborhoods by remote control, coordinated with security workers at participating businesses.

Target also has been paying for a lawyer and a paralegal in the Minneapolis prosecutor's office through its charitable foundation, with an emphasis on prosecuting repeat criminals. "They don't just give us money -- they demand accountability," said Hennepin County Attorney Amy Klobuchar. "There were huge strings attached when we received the funding for our new staff, and we were expected to routinely communicate how the money was used and what kind of results we'd gained. Here's an example: In the past, the DA's office tracked input numbers [how many criminals were charged], though once we were working with Target, we were required to track output numbers, or how many convictions we get in a year."

Before Target's involvement, the prosecutor won convictions for about three repeat criminals a year. Since adding the new staff and changing how it operates, the prosecutor now has more than 90 such convictions in a year.

Target's latest ventures include building a forensics lab for the Minnesota Bureau of Criminal Apprehension, including FBI and other agency officials in their corporate leadership programs and providing various agencies with "sting trailers," trucks filled with electronics and other merchandise to lure criminals -- and containing wireless devices that send information to police. The company also has run programs for the World Customs Organization to determine how to protect cargo through advanced technical systems and "smart boxes."

Such close cooperation sometimes has Target employees working as de facto law enforcement officials. Chris W. Nelson, director of assets protection for the retailer, recalled one case in which he worked with federal agents for two years to break up a crime ring. He questioned informants, got to know some of the suspects and was there as a federal SWAT team surrounded one of the ringleaders on a speedboat on a lake in Minnesota.

The suspect "stopped short as he spotted me in the crowd and shouted, 'What the [expletive] is Target doing here?!' " Nelson said. "I still love that one."