President Carter declared last night that he is prepared to use military force to protect the United States' "vital interests" in the Persian Gulf, and he called for resumption of registration for the military draft.

In a somber State of the Union address to a joint session of Congress and a national television audience, the president denounced the Soviet Union's "radical and aggressive" step of invading Afghanistan, and warned the Soviets against military moves in the oil-rich Persian Gulf region.

"An attempt by any outside force to gain control of the Persian Gulf region will be regarded as an assault on the vital interests of the United States," Carter said. "It will be repelled by use of any means necessary, including military force."

The president said that he hoped that military conscription through the draft will not be necessary. But he said that he will send legislation and budget proposals to Congress next month to "revitalize" the Selective Service System "so that we can begin registration and then meet future mobilization needs rapidly if the arise."

In response to the threat posed by the Soviet invasion of Afghanistan, Carter also called for removal of "unwarranted restraints" on U.S. intelligence agencies, and said the administration is now "making arrangements for key naval and air facilities to be used by our forces in the region of Northeast Africa and the Persian Gulf."

He reiterated a 1959 executive agreement by the United States to "assist Pakistan in resisting any outside aggression," and said he will ask Congress "specifically to reaffirm this commitment" and to provide additional military and economic aid to Pakistan. Without elaboration, he said that in the weeks ahead "we will further strengthen political and military ties with other nations in the region."

Administration officials said the draft registration legislation that the president will send to Capitol Hill next month will call for appropriation of about $10 million for the accelerated purchase of computers and for the training of personnel to serve in the moribund Selective Service System. t

But officials said the actual registration of young Americans could not begin until several months after passage of the legislation.

They said it has not been decided whether to require women as well as men to register for the draft, a step that would take additional legislation. The age for registration apparently would remain between 18 and 26 as required under the Selective Service law, which remains on the books but has not been used since the draft was ended in June 1973, as the United States was phasing out of Vietnam.

Carter has said repeatedly that he "would not hestitate" to resume registration for the draft if he thought it necessary to protect national security. He has also vowed that any military draft imposed by his administration would be "fair" and not include such exemptions as those for college students, many of whom escaped military service during the Vietnam war.

Last year, Defense Secretary Harold Brown told Congress that any legislation to resume registration for the draft should be applied to women as well as men. But as late as last summer, before the Soviet invasion of Afghanistan, the administration strongly opposed a measure that would have required 18-year-olds to register for possible military service.

Overall, the speech laid down a new, hard-line U.S. stance against future Soviet expansion that reflected the administration's anger and disillusionment over the Soviet invasion of Afghanistan last month. It was advertised in some quarters earlier as containing a new "Carter doctrine," and that is how the president's declaratin of an American vital interest in the Persian Gulf region is likely to become known in the future.

Carter's unilateral declaration of a new U.S. defense perimeter -- in effect placing the Persian Gulf on the same footing as western Europe -- was a bold exercise of presidential authority. The United States has no security treaties with any of the Persian Gulf nations, and Carter's policy pronouncement was made with no sign of consultation with Congress or the nations of the region. Last night, administration officials refused to say what is meant by the "Persian Gulf region," but suggested that it includes Iran.

The president spoke rapidly and with unusual force during the 31-minute address. He was interrupted 21 times by applause, including when he called for resumption of registration for the draft. He left the House chamber slowly, reaching out to shake hands with members of Congress and his administration and basking in the applause.

Reaction was predictable. Senate Majority Leader Robert C. Byrd (D-W. Va.) called the speech " a correct assessment of the state of the union." He characterized it as "strong ... not overly bombastic," and predicted Carter would have Congress' support.

Senate Foreign Relations committee Chairman Frank Church (D-Idaho) said he supported registration for the draft and agreed with Carter on use of military force so long as it is "related to the vital interests of the U.S. in maintaining access ... to the oil fields."

GOP presidential candidate John Connally said he supports Carter on resuming draft registration, but overall he criticized the president for "choosing rhetoric as opposed to dealing with reality." Connally said the address failed to address the domestic issues on which "the nation will rise and fall."

The Senate's acting minority leader, Ted Stevens (R-Alaska), on the other hand, said he was "glad to see the president catch up with the American people" on defense spending, and added that, "to my knowledge, no president of the United States has ever sid the whole Persian Gulf is a national interest area."

House Minority Leader John Rhodes (R-Ariz.) said Carter was "rattling a scabbard without anything in it."

Sen. William L. Armstrong (R-Colo.) called the speech "a major disappointment"; one complaint was that Carter did not recommend a tax cut.

Coming at the beginning of a presidential election yer, the speech was also a crucial political statement by a president who has seen his popularity rise dramatically since the Nov. 4 takeover of the U. S. Embassy in Tehran, where last night aout 50 Americans remained as hostages of Iranian militants.

Of all the measures Carter has taken in response to the Iranian crisis and the invasion of Afghanistan, the most politically risky was clearly his call last night for renewed registration for the draft. Earlier measures to counter the Soviet invasion -- the partial embargo of grain shipments and the threat to boycott this summer's Olympic Games in Moscow for example -- touched relatively narrow segments of American society the most deeply.

But registration is bound to raise fears of later conscription, affecting millions of Americans, from the young people who might be drafted to their parents who remember the experience of earlier drafts and wartime crises.

In keeping with the experience of the last two months, the president devoted about two-thirds of his speech to foreign policy issues, particularly the Soviet invasion of Afghanistan, which he said "could pose the most serious threat to world peace since the Second World War." And his discussion of domestic issues dealt almost exclusvely with a demand for passage of energy legislation, which he said is necessary to free the United States from "our dependence on foreign oil $ is a clear and present danger to our national security."

Carter said he will hold U.S. oil imports this year below 8.2 million barrels a day, and will enforce that policy with the imposition of an import fee if necessary. If serious oil shortages arise this year, he said, "I will not hesitate to impose mandatory gasoline rationing."

On the Iranians crisis, the president reiterated U.S. policy that "we will never yield to blackmail," and he warned Iranians leaders that the presence of Soviet troops in neighboring Afghanistan poses "the real danger to their nation."

"If the American hostages are harmed, a severe price will be paid," he said. "We will never rest until every one of the victims is released."

But Carter reserved his toughest rhetoric for the Soviet Union, which he accused of using "its great military power against a relatively defenseless nation."

"Verbal condemnation is not enough," the president said "The Soviet Union must pay a concrete price for its aggression ... The Soviet Union must realize that its decision to use military force in Afghanistan will be costly to every political and economic relationship it values."

In that connection, Carter reaffirmed his belief that "with Soviet invading forces in Afghanistan, neither the American people nor I will support sending an Olympic team to Moscow" this summer. On Sunday, the president asked the U.S. Olympic Committee to boycott the Moscow Games if Soviet troops are not withdrawn from Afghanistan by Feb. 20 and if the International Olympic Committee refuses to move or postpone the games.

Declaring that "the 1980s have been born in turmoil and change," Carter said that "it has never been more clear that the state of our union depends on the state of the world."

"And tonight," he added, "as throughout our generation, freedom and peace in the world depend on the state of the American union."

The Soviet thrust into Afghanistan "is of great strategic importance," the president said. The Persian Gulf region, he noted, contains more than two-thirds of the world's exportable oil and is now under a "grave threat" from the Soviets.

In an appeal for cooperation from U.S. allies and nations of the Persian Gulf region, he added:

"This situation demands careful thought, steady nerves and resolute action -- not only for this year, but for many years to come. It demands collective efforts to meet this new threat to security in the Persian Gulf and Southwest Asia. It demands the participation of those who rely on oil from the Middle East and are concerned with global peace and stability. And it demands consultation and close cooperation with countries in the area which might be threatened."

Meeting the challenge posed by the Soviets, Carter said, "will take national will, diplomatic and political wisdom, economic sacrifice and, of course, military capability. We must call on the best that is in us to preserve the security of this crucial region."

In the course of the speech, the president reaffirmed his commitment to nuclear arms control and the cause of human rights around the world. But these once top priority issues for his administration were pushed far into the background as he dealt with the developments in Southwest Asia.

On domestic issues, Carter called on Americans to "save energy" and pledged to continue reducing the federal deficit and eventually to balance the budget.

"The decade ahead will be a time of rapid change, as nations everywhere seek to deal with new problems and age-old tensions," the president said. "But America need have no fear -- we can thrive in a world of change if we remain true to our values and actively engage in promoting world peace."