The United States demonstrated its displeasure with a political crackdown in South Korea by calling its ambassador home yesterday as tensions mounted between the two allies.

The immediate cause of Washington's action in recalling Ambassador William Gleysteen was the ouster of South Korean opposition party leader Kim Young Sam from the National Assembly. The State Department Thursday expressed regret about this action, declaring it to be "inconsistent with the principles of democratic government."

The ouster of Kim, in Washington's eyes, is the latest and most serious sign that internal strife has resumed in Seoul, with consequences that are difficult fo foresee for America's front-line Asian ally.

State Department officials said that ebyond the sumbolic importance of recalling the ambassador for consultations, the action was taken because Gleysteen is needed for a round of policymaking here next week concerning the South Korean situation.

The authoritarian regime of President Park Chung Hee has taken increasing offense at the out-spoken, independent-minded Kim since he was elected leader of the opposition party in a hotly contested election in May.

Kim is among those who met with President Carter during his trip to Seoul last July. At the time, Carter called for South Korea to match its economic strides with similar progress in political and human rights, and believed he had obtained assurances that Park would take steps in this direction.

Shortly after returning to Washington, Carter announced postponement for the rest of his term in office of the plan to withdraw U.S. ground troops from South Korea. The Seoul government was quietly relieved.

The crackdown on the opposition, which took a serious turn with a bloody police raid on opposition party headquarters Aug. 10, came as an unpleasant surprise to the Carter administration.

The State Department condemned the police raid as "excessive and brutal," but has had little to say in public since then about week-by-week developments. Officials here said Gleysteen in Seoul and Assistant Secretary of State Richard Holbrooke in Washington have delivered frequent private expressions of concern and dismay to the South Korean government during this period.

As a result of a lawsuit filed by three party members, a Seoul district court issued a ruling stripping Kim of his authority to run the opposition party. Kim charged that the government's secret police, under Park's direction, were responsible for the suit and declared that he would defy the ruling.

The vote to expel him from the National Assembly was taken Thursday by a two-thirds vote of the ruling party and its government-appointed party, which had surprised observers by winning more popular votes in last December's election than the ruling party, holds 67 of the 233 seats in the single-house Assembly, less than a third. Opposition lawmakers boycotted the vote against Kim and sought unsuccessfully to block the vote with a sit-in.

Kim has called publicly for the United States to intervene to save what remains of democracy in South Korea. This statement angered the South Korean government and made the U.S. position more difficult.

As both opposition militancy and government militancy grow, the danger to long-term political stability has increased, according to U.S. officials. The U.S. commitment and interest in South Korea, as well as the Carter administration's human rights stand, make it difficult for Washington to remain aloof. But there is still no agreement here about what to do or say.