The withdrawal of some U.S. Embassy personnel from Beirut was intended to safeguard nonessential staff members from potential violence while maintaining enough of a presence to underscore U.S. determination not to be driven out of Lebanon, U.S. officials said yesterday.

The officials, who called the action a "temporary movement" rather than an evacuation, said a continued diplomatic presence is important to show U.S. resolve in the face of terrorist threats and as a gesture of support for Lebanon's embattled President Amin Gemayel.

Gemayel is struggling to overcome a mutiny by some Christian militias. The officials said a total U.S. pullout could further undermine Gemayel's position by creating the impression that the United States had lost confidence in him.

The officials said the administration believes that it is important for Ambassador Reginald Bartholomew to remain in Lebanon to underscore U.S. support for Gemayel's efforts "to restore the sovereignty and territorial integrity of Lebanon." Bartholomew has maintained close ties to Gemayel despite strains in the U.S.-Lebanese relationship.

The administration also is aware that a flight of all U.S. personnel would be seen throughout the Middle East as a reversal of President Reagan's pledge when he withdrew the U.S Marines from Beirut a year ago that the United States will not be driven out of Lebanon by terrorist pressures.

These pressures still exist, both in the form of anti-American threats by Shiite Moslem extremists and in the possibility that the revolt of Christian militias led by Samir Geagea against Gemayel's Syrian-influenced policies will trigger renewed civil warfare in the Beirut area.

Despite its desire to keep a diplomatic presence in Lebanon, the administration also does not want a repeat of the devastating bomb attacks that killed almost 300 U.S. military and diplomatic personnel in Beirut during the last two years.

"The numbers and security arrangements, including the need for particular personnel to be present in Lebanon, is kept under constant review, and we are taking action as we deem necessary," State Department spokesman Edward Djerejian said in announcing the partial withdrawal.

He gave no details about how many people were evacuated, how they were brought out or where they were taken.

"At the moment," he said, "we have moved some embassy personnel out of Lebanon as a temporary measure because of the current unsettled situation in the east Beirut area," the Christian enclave where the possibility of clashes between pro- and anti-Gemayel factions is strongest. "The embassy is functioning, but with a limited staff. The ambassador remains at his post."

Other officials, who asked not to be identified, said that the personnel who were withdrawn were assigned mostly to long-range projects and were considered least essential to the embassy's immediate concerns.

These officials also declined to say how many of the approximately 20 people at the heavily fortified embassy residence in east Beirut had been withdrawn. They also would not say whether those who remained still are at the residence, but, in a hint that Bartholomew and the remaining staff had moved elsewhere, they noted that the split within the Christian factions in east Beirut is currently regarded as the biggest potential source of trouble.