The Carter administration, after a hiatus of nine months, has decided to send a military mission to Somalia as the first step toward the supply of about $15 million in "defensive" arms to that country.

The administration decision, which has been communicated to Congress and the Somali government, follows tightly worded assurances from President Siad Barre that the weapons will not be used against any other country but only for internal security or self-defense of Somalia's existing territorial borders.

The weapons supply program, still in an early stage, would be a modest U.S. counterweight to the 17,000 Cuban troops and extensive Soviet weaponry provided to neighboring Ethiopia, which has been Somalia's foe in a war over the Ogaden region.

In an effort to counter Soviet backing of Ethiopia and induce Somalia to be "our friend," President Carter decided in principle last July 15 to supply weapons to Somalia. U.S. officials were shocked when only eight days later Somali regular forces invaded the Ogaden and a full-scale war with Ethiopia erupted.

Last Aug. 9, the State Department told a Somali military aid mission in a meeting here that the arms could not be supplied while the Ogaden war continued. Later the United States demanded assurances that any weapons it supplies will not be used to attack across recognized territorial borders.

The "hands-off" policy of the Carter administration - which also refused to permit U.S. allies to transfer American arms to Somalia - left that country on the losing end of the military test of strength with Soviet and Cuban backed Ethiopia.

Some American officials, including presidential national security affairs adviser Zbigniew Brzezinski, and a number of friendly governments in the Middle East and Europe were dissatisfied with the seeming U.S. impotence, particularly when Soviet-Cuban aid to Ethiopia reached dramatic proportions. But the majority view in the administration - and the view adopted by Carter - was that the United States must not condone nor assist an invasion by an African nation across a neighbor's border.

The assurances that have been provided by Somalia in recent weeks were described by U.S. officials as quite explicit. The officials added that, before proceeding, the United States will make certain through vigilant inquiry that the Somalis mean what they say about the strictly defensive use of the U.S. arms. Having been embarrassed before by Somalia, some senior American officials are known to be skeptical about that nation's intentions.

The first step in establishing a military supply relationship is the dispatch of a Pentagon survey team. Somalia was informed in recent days of the U.S. willingness to send a team, and asked to approve the customary agreement about the team's activities.

An on-the-spot Pentagon survey could take place later this month if Somalia gives quick approval. Then a presidential determination must be made to qualify the country for arms sales. The final steps are the signing of contracts for specific weapons and their submission to Congress for review. The U.S. weapons for Somalia are expected to be financed by Saudi Arabia.

Should the Carter administration fail to supply the arms despite the Somail assurances, the pressures for a swing by that nation back to a Soviet military relationship probably would be increased. Most of Somalia's current weaponry was provided by the Soviet Union in the past decade, before Russia "switched sides" and took up an alliance with Ethiopia, the former U.S. military partner in the area.