BUENOS AIRES, Argentina (AP) _ President Raul Alfonsin says the third military uprising in 20 months had its origins with soldiers' low pay, poor equipment and resentment of their censure by society for harshly repressing guerrilla activities in the 1970s.

In his longest remarks on the four-day insurrection that ended Sunday and a rare speech on the military, the man whose election in 1983 ended eight years of military rule defended his lengthy resolution of the crisis.

''The convincing and persuading took so long precisely because no condition was accepted,'' Alfonsin was quoted as telling leaders of the CONINAGRO farm cooperatives Tuesday in a speech at the state Bank of the Nation.

''A dialogue of more than two hours (is better than) a battle, even if it lasted just five minutes, which could have cost Argentine lives,'' Alfonsin said. ''We should thank God that all this could be solved without having to lament the deaths of hundreds of Argentines ...''

Three people died in the uprising, the bloodiest of the three revolts sparked by the military since April 1987. Three soldiers were wounded by a rebel mine blast in last January's uprising.

Meanwhile, the 6th mechanized infantry regiment at Mercedes remained in rebel hands Tuesday, although Maj. Hugo Avete said he was simply was awaiting his replacement by a new commander, which was expected later today, the government news agency Telam reported.

The base, 62 miles west of the capital, ''is in the process of being normalized,'' Defense Ministry spokesman Faustino Altamirano said.

Rebel commander Col. Mohamed Ali Seineldin remained in detention at a military garrison in Buenos Aires. The approximately 500 troops who had rallied to his side at the Campo de Mayo army base in suburban Buenos Aires have returned to their units, Altamirano said.

''An investigation will take place to clear up who was responsible for what, and they will be punished,'' Altamirano said.

Sixty-three coast guardsmen who sided with Seineldin were imprisoned at the Campo de Mayo. Federal Judge Alberto Piotti was to begin interrogating them Thursday.

Alfonsin noted that it is up to the courts, not him, to resolve one of the rebels' key demands - an end to the prosecution of officers for human rights abuses committed during the 1976-83 military dictatorship.

At least 8,900 suspected leftists were arrested by security forces and vanished, according to a commission appointed by Alfonsin. The ''disappeared'' are presumed executed.

Rebels also demanded a shakeup in the army command, including, according to local news agencies that cite military and rebel sources, the removal of army chief of staff Gen. Jose Dante Caridi.

Caridi ''might well have to go,'' the English-language Buenos Aires Herald said Tuesday in an editorial, ''because of his failure to anticipate this crisis and because of the extreme reluctance of many army units to adopt action stations, thus denoting lack of control over his force.''

Alfonsin denounced critics who have wondered aloud whether a secret deal was made with the rebels. He was quoted as calling them ''vampires ... who apparently feel sad because solutions were arrived at without the spilling of blood.''

Such doubts stem from the disinclination of loyalist troops to fire on rebels during the uprsing, and the maintenance of army bases in rebel hands after the insurrrection was declared over Sunday by the government.

After the April 1987 insurrection led by cashiered Lt. Col. Aldo Rico, three-quarters of the army's top generals were retired, and legislation was passed that limited the prosecution of officers for rights abuses.

Alfonsin also declared then that rebels had surrendered unconditionally.

7EST