After nearly 20 years of pushing, prodding, cajoling and begging the Western powers to take notice of them, the nonaligned countries representing most of the Third World have finally announced that they have had it.

Under the leadership of Cuba, host of the sixth nonaligned summit ending today, the movement's 94 members have produced their harshest condemnation of the West since the organization was founded -- as a coalition of states fighting for independence in the cold war in 1961.

For some delegations, the new position implies a tilt toward the Soviet Union. Others caution that, rather than an east-west competition for influence, they see a north-south battle in which their principal enemy is the United States -- by virtue of its dominant world position and its failure, despite repeated warnings, to accommodate Third World needs.

Neither the condemnation, nor the implied shift to the East has pleased all the countries represented here. Some -- Yugoslavia, Singapore, Malaysia, Senegal and a dozen more -- have in no uncertain terms charged Cuba with trying to manipulate the conference to its own will.

By taking advantage of its position as chairman, in deciding who speaks first and at the best time of day, and declaring a consensus -- where none exists, Cuba, they say, is imposing its will.

Others, who tend to agree with Cuba on basic issues, have been antagonized by the Cuban tactics. Many believe the movement is headed for more confrontation over the next three years of Cuba's chairmanship.

The moderates managed to water down much of the strident language in an original draft of what will be the final summit declaration -- written, by tradition, by the host country. For every blast against Western "Imperialism," they have tried to include a denunciation of Eastern "hegemony."

As the conference wound to an end tonight in a closed session, Egypt appeared to be fighting for its life within the organization, trying to fend off a last minute Cuban-led attempt to "suspend" Egypt because of its "betrayal" of the Palestinian people.

But a number of delegations, including the Arab majority, appear to have given their silent approval to the pro-Soviets by virtue of their desire to be as strongly anti-American as possible.

For the United States, which had expressed concern and lobbied hard from outside the movement for moderation, the summit is seen as disaster.

The conference produced strident calls for U.S. troop withdrawal from South Korea, denunciation of Washington's Middle East diplomacy, independence for Puerto Rico, evacuation of the Guantanamo Naval Base in Cuba and others around the world, and the legitimization of armed rebellion in southern Africa.

Perhaps even more significantly for the future, the delegates declared the key to solving the energy problem, which has destroyed some of their fragile economies while ballooning others, is within the movement itself.

While the oil producers swallowed hard at Third World consumers' calls for price concessions, raw material barter agreements and the investment of petrodollars in development projects rather than American banks, the producers listened.

Whether the movement's new militancy is a real one, or simply the deafening sound and fury of the steamroller unleashed by Cuba and its allies remains to be seen. The first test will come almost immediately when the U.N. General Assembly meets later this month.

The moderates continue to maintain that the meeting's Chairman, Cuban President Fidel Castro, has gone too far, that a rising tide of resentment is growing within the silent majority and will eventually make itself felt.

Regardless of Cuba's claims of independence from the Soviets, they say, coincidence with Soviet policy will push off members of the movement to return to the original middle course between the superpowers.

But for now, however, the movement has emerged from the six-day meeting ostensibly with a policy that, virtually by definition, is against the United States on every pressing world issue. Moreover, hear the Cubans and their friends tell it, the movement has a new leader, Fidel Castro.

Through skillful, and some say unethical, use of the chairmanship, sheer audacity and personal charisma, Castro attempted, and to some extent succeeded in molding an organization of states that are well aware of their traditional ineffectiveness in what Guyana's prime minister, Forbes Burnham, last week called the fight between "the big boys and the little boys."

Castro addressed the issue of Soviet dominance over Cuba in his speech inaugurating the summit. "Throughout our revolutionary life, no one has ever tried to tell us what to do," he maintained. "No one has ever tried to tell us what role we should play in the movement of nonaligned countries."

While the question of Soviet influence greatly concerned the more vocal moderate delegations, particularly those in Southeast Asia who fear Soviet dominance through Vietnam, many of the nations tended to follow the leader who offered them action.

"For the little countries that basically lean toward the West and have most of their ties there, but are looking out for themselves," one observer noted, "a hard-line movement policy puts them in a better future negotiating position with the United States."

The silent majority sees in Castro, a Cuban delegate maintained, someone who can both stand up to the United States for them, and talk to the Soviets for them.

Those who outspokenly disagreed with Castro's characterization of the battle as first and foremost against the United States were left behind in a tidal wave of stirring rhetoric that promised to have some teeth in it.

Unfortunately for the United States, its friends in the movement tend to be those who put their faith in protocols and politeness rather than in audacity.

Thus, when Yugoslavia objected to the way Castro handled the meeting, Cuban officials knowingly pointed out in private that it was "well known" that Yugoslav policy usually coincided with U.S. policy.

When Singapore objected to Cuba's muscling out the Cambodian delegation representing the Pol Pot regime in favor of the government installed last winter by Vietnam, Castro called the Singapore delegation "imperialist stooges."

Aside from their essential grayness, as opposed to the flashiness of the militants, the moderates now admit they chose the wrong issues to fight over.

Their battle on the Cambodian issue was essentially a point of order, and they exhausted enormous energy only to end up looking as though they were defending what all agreed was the indefensible Pol Pot government.

"The Yugoslavs," one Western diplomat observed, "have been defending the Maginot line," by talking about "founding principles" and "rules" while the Cubans were calling for action against problems that threaten many members' existence at home.

Thus, while Yugoslavia won some toned-down wording in the Cuban-written summit declaration that provided the basis for discussions here, the substance of the document remains largely intact.