Mozambique intends to become a "revolutionary base" in the struggle to overthrow the white-ruled governments of southern Africa, President Samora Machel told a congress of the ruling party that ended here today.

He made the pledge in a nine-hour speech Thursday.

Machel pleged to carry out a radical socialist revolution and to eradicate all traces of capitalism from this former Portugese colony. The five-day congress was convened to transform the country's liberation movement into a Marxist-Leninst Party. Machel was unanimously elected its leader.

The bearded revolutionary who led the 13-year nationalist guerrilla struggle against Portugal, appeared determined to establish Mozambique as Africa's most revolutionary and first true Marxist-Leninist state.

Tonight, he appealed for support from the Communist world to help Mozambique continue its fight against "racist and imperialist aggression." He gave no indication of what spacific kind of aid he wanted. There have been recent reports of Soviet arms shipments arriving in this country's northern ports.

Mozambique is under almost daily attack from neighboring, white-ruled Rhodesia. Some forays by Rhodesian troops have gone deep inside Mozambique.

The main purpose of the congress was to convert the Front for the Liberation of Mozambique (Frelimo), which led the successful war against Portugal, into a small vanguard party of carefully chosen members faithful to the "scientific socialism."

Establishment of the new party came as a new Revolutionary Party, was formed in neighboring Tanzania and as reports reached here that Angola intends to create a Marxist-Leninist party this year in what appears to be a trend toward the radicalization of southern Africa that former U.S. Secretary of State Henry A. Kissinger was anxious to prevent.

Mozambique's desire to associate itself with the Soviet bloc was quite evident. The Communist parties of practically all Soviet bloc states were represented. Particularly prominent were East Germany and the Soviet Union.

Also making speeches were representatives from the Communist parties of Cuba, Brazil, Chile, Portugal, Italy and West Germany. China and allies in Southeast Asia were reportedly invited but unable to attend because of their preoccupation with political problems at home. The only Western non-Communist parties invited were the Socialist from Sweden and Portugal.

Machel did not mention the United States or any other Western nation by name in his repeated, heated denounciations of imperialism, although the observers from Cuban and Chilean Communist parties and the Palestine Liberation Organization did so in blistering attacks.

The only Western country Machel singled out for possible cooperation was Portugal, with which ties have been strained for some time. Mozambique is now discovering that it desperately needs technicians and is apparently turning back toward the former colonial power fro help.