Lt. Gen. Peter Wallis, Zimbabwe's military commander and the most powerful white in the new government, will leave his post at the end of this month, an official statement issued here today said.

Walls leaves behind him the unfinished task of merging the two guerrilla armies and the former Rhodesian government forces that fought each other in Zimbabwe's seven-year conflict before its independence last April.

His departure is seen as blow to Prime Minister Robert Mugabe, who has asked Walls to oversee the task of merging the forces, a project that has turned out to be the most difficult problem of Mugabe's young administration. Mugabe has complained on several occasions about delays in the process.

Wall's exist is also likely to add to the fears of the already jittery 200,000 whites who are uncertain about their future here under a black-majority government. Mugabe had hoped to reassure them when he asked Walls, formerly his main foe, to stay on a military commander under his government.

The announcement also comes at a time when relations between Mugabe's Zimbabwe African National Liberation Army and the Zimbabwe People's Revolutionary Army of his former guerrilla partner, Joshua Nkomo, are strained.

No official explanation was given today for Walls' departure, which had not been expected until the end of this year when the merging of the three armies was to have been completed. He will go on leave July 29, relinquishing all duties, and will retire at the end of this year, the statement said. No replacement has been named.

Walls is known to have had problems in merging the guerrilla armies and the former government forces because of bickering between the two former rebel armies over the composition and numbers from each force that would go into the unified national Army.

It is said that Walls has complained on several occasions that this bickering was hindering his task and it is seen as likely that frustration over this was a major reason for his decision to leave early.

One source close to Walls also suggested that a heart-related health problem was a factor. The rhodesian-born Walls was not available for comment tonight.

Walls, 54, has been commander of the Army since 1972 and in 1976 he took over as head of the police and Air Force as well.

During the war he acquired a reputation as a major political force behind the scenes.

At the British-sponsored talks in London last year that led to Zimbabwe's independence, he was one of the most important participants.

However, many white soldiers began turning against Walls because they thought he had not negotiated a good enough deal. When he accepted Mugabe's offer to oversee the merging of the forces, some soldiers openly insulted him as a turncoat.

Since independence, 63 percent of the white officers of the former Rhodesian Army have decided to resign -- the highest portion in any government body. Only 7 percent of whites have done so in the civil service.

One of the main problems in forming the new national Army is that it will not be able to absorb all of the 35,000 former guerrillas, many of whom are leaving from the assembly points because of boredom and poor living conditions.

A core section for the new Army is being trained by British Army officers, as requested by Mugabe. In an attempt to accelerate the job, Mugabe has asked Britain to send more officers to assist, which they have agreed to do.

The announcement of Walls' departure said that the stage had been reached where it was possible to form battalions of the national Army at the rate of one every two weeks. This was given as a reason why Walls could be released now.

Walls expected to continue to live in Zimbabwe, the statement said.