President Reagan today committed his administration to preparing for combat in outer space if necessary and pledged to continue with plans for deployment of an antisatellite weapon.

In a new statement of national space policy, the administration said the United States is "committed to the exploration and use of space by all nations for peaceful purposes and for the benefit of mankind," but also stated that one of the basic goals of the American space program is to "strengthen the security of the United States."

While the president was not specific about when antisatellite weapons should go into service, Defense Secretary Caspar W. Weinberger, in secret guidance sent to the Air Force recently, set fiscal 1987 as the target date.

The Soviet Union has already developed and is testing a primitive version of an antisatellite weapon and the United States is conducting research on a more sophisticated version, although American officials have long attempted unsuccessfully to negotiate a ban on such arms. The administration, judging from the Weinberger guidance, believes that it is behind the Soviet Union in some of the techniques for seizing and holding the high ground of outer space. Said Weinberger:

"The U.S. reliance on military space systems continues to grow, despite the asymmetric growth and Soviet capabilities to deny our access to space and our ability to operate freely in space. It is in our national interest to eliminate this asymmetry so that we can continue to capitalize on the efficiencies and advantages of military space operations."

In his policy statement, Reagan made no commitment to proceed with plans for developing a permanent space orbiting station or the building of a fifth space plane, although he did say in a speech here that the nation must look toward "establishing a more permanent presence in space."

Weinberger, in another section of his defense guidance, contended the United States should work on space weapons "to provide a hedge against surprise" by the Soviet Union.

This hedge, the secretary said, should include "the prototype development of space-based weapons systems so that we will be prepared to deploy fully developed and operationally ready systems should their use prove to be in our national interest."

This amounts to orders to press on with research on Buck Rogers-type weapons, but stops well short of a decision to actually put them in operation over the Earth.

The president and Nancy Reagan, who are vacationing at their mountaintop ranch north of Santa Barbara, Calif., flew here this morning to watch the touchdown of the space shuttle Columbia as it ended its seven-day stint in space.

As a crowd of about 55,000--out of more than 525,000 who flocked to the desert air base for the shuttle landing--greeted the president by waving tiny American flags, Reagan spoke glowingly of space as the "ultimate frontier."

He said the landing was the "historical equivalent to the driving of the golden spike which completed the first transcontinental railroad.

"It marks our entrance into a new era. The test flights are over, the groundwork has been laid, now we will move forward to capitalize on the tremendous potential offered by the ultimate frontier of space."

Reagan spoke enthusiastically of technological innovations that have been the byproduct of space exploration and research. "The space shuttle will open up even more impressive possibilities," he said, "permitting us to use the near weightlessness and near-perfect vacuum of space to produce special alloys, metals, glasses, crystals and biological materials impossible to manufacture on Earth."

Aides had, for months, urged Reagan to more closely identify himself with the space program and with the high technology innovations that are a byproduct of it. Some advisers thought this could help him counter perceptions that his basic policy initiatives are largely negative--cutting back social spending in domestic affairs and adopting a hardline stance against the Soviets in foreign policy.

However, the national space policy statement that was released here today after 10 months of analysis and study by an interagency administration group adopted a hawkish tone. In its inception, the space program was lagely civilian-oriented, but the policy statement appeared to change the mix to give more weight to national security objectives.

The policy statement spoke, for example, of pursuing "activities in space in support of the United States' right of self-defense" and promised to explore the "survivability and endurance of space systems . . . commensurate with the planned use in crisis and conflict."

Although the statement said that the space program would be comprised of "two separate, distinct and strongly interacting programs--national security and civil," it said that priority use of the shuttle would be provided for national security missions.

The policy statement, much of it a rehash of longstanding objectives with a new tilt on national security, promised to continue space exploration for the purpose of expanding "knowledge of the Earth, its environment, the solar system and the universe." But the statement also included as a goal the expansion of private investment and involvement in the civil side of the space program.