A U.S. District Court judge extended a temporary restraining order yesterday that prohibits the Navy from discharging 13 seamen recruits who have been exposed to the AIDS virus.

Judge Louis Oberdorfer set a hearing on a preliminary injunction against the Navy for Jan. 17.

Navy spokesman Lt. Steve Pietropaoli said "administrative separations" for the 13 men will not be enforced until the case is decided in U.S. District Court. A group of 10 recruits in San Diego, who also face discharge because of exposure to the acquired immune deficiency syndrome virus, was denied a temporary restraining order by a California court yesterday.

A Washington lawyer, Susan Silber, who is handling the case for the recruits, said they sued the Navy to challenge a Dec. 4 policy by Navy Secretary John F. Lehman Jr. that she said allows seamen to be discharged if their blood tests are positive for the virus.

This policy goes further, she noted, than the Department of Defense policy on blood testing, which says that military personnel should be discharged only if they are medically unfit for duty.

Exposure to the virus does not mean a person will develop AIDS. Scientists estimate between 5 and 25 percent of those exposed may develop the fatal disease or its symptoms.

Testing recruits for exposure to the AIDS virus began in all branches of the military in mid-October after Pentagon officials said the disease poses a risk to soldiers and troop strength.

A Department of Defense spokesman said 40 of the 34,996 individuals tested from Oct. 15 through Oct. 31 at induction centers nationwide were found to have been exposed to the AIDS virus. These individuals were denied induction into the military. More recent figures are not available.

The Army and Air Force, unlike the Navy, have not issued complete policies on how to handle recruits and active duty personnel who have been exposed to the virus.

"Secretary of Defense Caspar Weinberger's Oct. 24, 1985, directive regarding the military's program for testing states that those seamen already in the service and who test positive for HTLV-III antibody should not be discharged," Silber said. "The Navy asserts that the seamen must be discharged on the basis of a preexisting condition which would have disqualified them for service had it been discovered at the time of induction."

The 13 men, all of whom enlisted before the testing program began, were removed from their basic training units after a series of blood tests in the fall showed they had been exposed to the virus. They are now at the Bethesda Naval Hospital and the Naval District facility in Anacostia.

Raphael Lombardo, 24, from Cape Coral, Fla., was one of five of the recruits who held a press conference yesterday to protest their discharge notices. "I took my oath of enlistment on March 23," said Lombardo. "I've had 10 months of my life eating, drinking and working in the Navy. With all my heart and soul I want to stay . . . . "

Gary Batten, 23, of Houston, said, "My father made a career of the Navy and I want to, too . . . . "