A divided federal appeals court here yesterday overturned a ruling that would have required the National Aeronautics and Space Administration to release a tape recording of the last words of the crew of the space shuttle Challenger before the shuttle exploded Jan. 28, 1986.

The full court, in a 6 to 5 ruling, overturned a decision by U.S. District Judge Norma Holloway Johnson requiring release of the cockpit tape recovered from the sea. Johnson's ruling had been upheld in a split decision by a three-judge appeals court panel in July 1988. The shuttle erupted in flames 73 seconds after it was launched from Cape Canaveral. All seven crew members died.

The New York Times, citing the Freedom of Information Act, sued to obtain a copy of the tape, contending that it may contain details about background noises from faulty rocket boosters. It argued that the tape would enable the public to verify NASA's conclusion that the astronauts had no advance warning of the problem. It also questioned the accuracy of an edited NASA transcript of a portion of the tape.

NASA has refused to surrender the tape, contending that its release would subject the astronauts' survivors to emotional distress if it were repeatedly played on radio and television news broadcasts.

In yesterday's ruling by the U.S. Court of Appeals for the District of Columbia, Judge Douglas H. Ginsburg said that, under Supreme Court precedent, NASA need not disclose information applying to an individual if its release would constitute an unwarranted invasion of personal privacy. He ordered the lower court to hold a hearing on NASA's claims that release would infringe on the privacy of the astronauts' families.

In a dissent, Judge Harry T. Edwards said the majority opinion effectively creates an exemption from the Freedom of Information Act for information whose privacy value may be greater than its public value.