NASA and the Air Force knew before the launch of the space shuttle Columbia that the lens on a tracking camera had been malfunctioning and that contractors had been working to fix it, an Air Force spokesman said yesterday.

"This was a known problem before the flight," said Lt. Col. Mike Rein of the 45th Space Wing, which oversees the contract under which NASA gets pictures of shuttle launches. "They thought they had it fixed."

The images were out of focus, depriving NASA of what shuttle program manager Ronald D. Dittemore described as "the very best view" of the orbiter's belly after the shuttle was struck by a piece of foam insulation, ice or other debris during launch.

The camera that malfunctioned was in Cocoa Beach, Fla., about 15 miles from the launch site, Rein said.

The contractors on the project, Computer Sciences Raytheon and Johnson Controls Inc., planned to try the camera again when Columbia landed at Cape Canaveral, Fla. The shuttle broke up in the upper atmosphere over Texas.

The "soft focus" problem had been observed during an earlier flight, Rein said, though he didn't know if that was a shuttle or rocket launch. Military and commercial rockets are launched from the same range as shuttle missions and use the same photographic monitoring system.

It was not known how the blurry images might have affected NASA's determination during the flight that debris hitting Columbia's left wing would not jeopardize the orbiter and its seven-member crew. NASA discovered the problem with the pictures during the flight.

"They felt they had sufficient data to make the determination," said Kelly Humphries, a NASA spokesman.

NASA has said the impact of the debris is being reexamined as a possible cause of the shuttle's destruction.

Rein said the focusing problem was detected last fall. He said Computer Sciences Raytheon operates and maintains the lens.

Mike Dickerson, a spokesman for Computer Sciences Raytheon, a joint venture of Computer Sciences Corp. and Raytheon Co., said the company does optical tracking for the U.S. Air Force but he could not "confirm that there were any camera malfunctions that failed to capture any critical data."

Johnson Controls operates and maintains the camera, Rein said. It also worked with Computer Sciences Raytheon to fix the problem, he said. Neither the camera nor its operator was at fault, Rein said.

"The cameras used during the launch of space shuttle Columbia were fully operational and in compliance with government expectations," Johnson Controls said in a prepared statement. "A performance quality report generated after the Columbia launch verified that all cameras were operative and performed as expected."

"We have no knowledge of there being a problem," Johnson Controls spokesman Darryll Fortune said.

NASA said shuttle launches are recorded for the agency by 197 still and video cameras. The pictures are used during and after flights to assess damage to the orbiter, and for public relations. Some cameras record the launch from within 10 feet of the orbiter, while others track it from as far as 30 miles, according to a report by Johnson Controls.

Some cameras are focused on specific sections of the shuttle, while others capture the entire vehicle as it soars out of view. The malfunctioning camera would have provided the best view of the orbiter's underside about 80 seconds into its flight, when the wing was struck by debris, NASA said.

The average cost for the camera equipment is $189,000 per launch, Rein said. It is provided under a contract covering the years 1998 through 2006, worth as much as $57.3 million, he said.

Because of the long interludes between shuttle missions and the irregular schedule, Johnson Controls relies largely on a part-time staff of camera operators. In a case study last year, the company said a third of its workforce was part time.

"Yet customer satisfaction, product quality and timeliness of performance are at all time highs," the case study said.