It is no longer drought, but rather war that has become the major factor in a continuing famine that threatens the lives of 18 million Africans, according to a United Nations report released here today.

The report by the U.N. Office for Emergency Operations in Africa said that 80 percent of the Africans at risk of starvation this year live in four countries: Ethiopia, Sudan, Angola and Mozambique. In all four countries, the report said, civil wars have interfered with the planting and harvesting of crops and have prevented distribution of relief aid.

The report specifically blamed "externally supported insurgencies" in Angola and Mozambique which it said "have displaced hundreds of thousands of people, disrupted economic and agricultural activity and thus are the root cause of the continuing emergency."

Maurice Strong, executive coordinator of the United Nations' year-old African emergency operation, said that famine in Angola and Mozambique is "clearly the result of aggressive South African policy toward its neighbors."

South Africa helps fund and has used its soldiers to support rebel forces in Angola known as UNITA, who are under the command of Jonas Savimbi. It also has admitted to aiding antigovernment insurgents in Mozambique in violation of a nonaggression pact it had signed with that country.

In Sudan, the U.N. report said fighting between the government and rebels of the Sudanese People's Liberation Army had prevented deliveries of emergency food aid to the southern region and put about a million people at risk of starvation.

In Ethiopia, where rebel groups continue to fight in the northern, southwestern and southeastern corners of the country, the report said there are increasing numbers of displaced persons.

Last year the United Nations estimated that about 35 million people in 20 countries were at risk, primarily because of severe drought. Since then, the best rains in a decade and record crops in many of those countries have enabled Africa to produce its first food surplus in many years.

Strong said today that Africa's problems in 1986 are less concerned with obtaining food than with raising the cash needed to buy and redistribute that food. He said that donors already have pledged 80 percent of the food aid needed for pockets of famine on the continent, but that pledges had been received for only 15 percent of the cash required to buy and transport essential supplies such as seeds, pesticides, fertilizers and tools.

"Africa has produced significant surpluses of food grains this year. And it would be wrong to use imported food aid to replace African food," Strong said. "So we have been on a campaign to raise cash to buy food in Africa in the surplus areas and move it to the deficit areas." He added that "it is much tougher to get the donors to give cash to buy food and transport it than it is to get them to simply provide food aid out of their surpluses."

Without an estimated $460 million in immediate cash donations, the U.N. report said that last year's problem of late delivery of medicines, seeds and tools was likely to be repeated. The result of late delivery, the report said, was a likely return of famine victims to relief camps emptied in the past year.

Ethiopia continues to be the neediest country, the U.N. report said, with 6.5 million people affected by famine and a need for $177 million worth of nonfood assistance. Another $66 million is "urgently needed" to transport committed food aid, the report said.