Argentina, in a strongly worded note to the United Nations, said today it would not end its war for the Falklands unless Britain withdrew its "occupation forces" from the islands and lifted its air and sea blockade.

The note was released here by the Foreign Ministry amid continuing uncertainty about who was leading the country after the military leadership deposed the president, Gen. Leopoldo Galtieri, yesterday.

Argentina's note asked for the implementation of U.N. resolutions passed earlier in the crisis calling for withdrawal of all foreign troops from the islands and said U.N.-mediated negotiations were needed to achieve a definitive settlement.

The appeal to the U.N. Security Council came amid a restructuring of Argentina's military leadership, which has teetered on the edge of chaos since the defeat of its forces on the Falklands. In a brief ceremony today, Galtieri was replaced on the three-man ruling junta by Gen. Cristino Nicolaides, the new commander-in-chief of the Army.

The junta began immediately to hold private deliberations to choose a new president. Government sources said no appointment is expected for at least another day.

However, the junta said Interior Minister Alfredo Saint Jean, the constitutionally designated interim successor, was "charged with executive power"--effectively making him the acting president until the junta chooses a permanent one.

Meanwhile, the two warring countries completed arrangements for the repatriation of the first of approximately 11,000 Argentine prisoners taken in the British victory on the Falklands. In London, the British Foreign Office said Argentina had given a guarantee of safe passage to transport prisoners to the mainland.

The Foreign Office said the liner Canberra, with 4,000 prisoners aboard, and a smaller ship carrying 1,000 would sail from the Falklands en route to the small port of Puerto Madryn in southern Argentina later today. Britain, however, has warned that it would hold the officers among the prisoners until Argentina declared a formal end to hostilities.

The British Foreign Ministry announced later that the requisitioned cruise liner Canberra and the North Sea ferry Norland, carrying about 5,500 Argentine prisoners, left the Falklands' capital of Stanley for Puerto Madryn, The Associated Press reported.

The Argentine appeal to the United Nations was in effect a rejection of a British demand that Argentina follow up the surrender of its troops on the Falklands last Saturday with a declaration that all hostilities between the two countries were at an end.

The document states that "Argentina cannot and will not accept the situation of force that Great Britain has tried to impose." On the other hand, in what many observers interpreted as a face-saving acknowledgment of defeat, the note recognizes "a de facto cessation of hostilities, which Argentina is observing, but which will be precarious as long as the British attitude--evidenced by the military occupation, the blockade and economic aggression--subsists."

In an effort to breath new life into the U.N. mediation that failed before fighting broke out, the statement said: "Only negotiations within the United Nations framework can lead to a definitive solution to the conflict, eliminating a situation of illegitimate colonial domination, sustained by force, which in itself constitutes a permanent threat to peace."

As the shakeup inside the military government continued, a key question regarding today's statement is whether it represents the position of the new leaders. When it was read, Galtieri had resigned as commander of the Army but was still president, at least formally.

Sources in the Foreign Ministry said the idea for the statement was presented to Galtieri Wednesday and accepted by him two days later. The sources said that the statement has the backing of Nicolaides, the new member of the junta.

The same sources say that the statement is an attempt to bypass Great Britain's demand that Argentina never again resort to force in its claim on the islands. "Argentina would be sorry all its life for signing such a statement," one official said.

The officials stressed the statement's endorsement of U.N. resolutions 502 and 505 on withdrawal of foreign forces and said the language implicitely expresses Argentina's agreement to stop hostilities now. "The first point of Resolution 502 is that there should be a cease-fire," the source said. "There is. The second point is that Argentina's troops should withdraw. They are withdrawing. England knows because they are supervising it. The third point is that both sides proceed with negotiations. That is what we want now."

Galtieri today made no secret of his bitterness at being ousted by the 24 generals who make up the Army high command. As he left the Pink House, as the seat of government is called, last night, he said, "I am leaving because the Army did not give me the political backing to continue. I am not one of those who abandon ship in the middle of a storm, let the people of the nation know that."

The main contenders to become the new president are the Air Force chief, Gen. Basilio Lami Dozo--a hero after the war, and considered a liberal in the military--and Saint Jean, a close ally of Galtieri.

Also mentioned is Foreign Minister Nicanor Costa Mendez, who can claim most of the credit for today's U.N. note to ease the Falklands stalemate.

Heavy lobbying continued behind the scenes for Lami Dozo. He has come out with increasingly explicit statements in support of an early return to democracy and for economic reform. "The country cannot stand being a laboratory for transplanted economic models," he said, in open criticism of the military's six-year-old monetarist policies.

In an effort to hasten Galtieri's departure the political parties refused for a second time this week to meet with Saint Jean, who has been in charge of coordinating the junta's current plans calling for a return to democracy in l984. Francisco Manrique of the Federal Party called for Galtieri's court-martial. Leaders of the centrist Radical Party held private meetings with Lami Dozo.

Within military circles, the infighting has continued. The Navy commander and third junta member, Adm. Jorge Anaya, issued a policy statement that was notably less open to the idea of political reform than Lami Dozo's. A general told reporters that the growing consensus within the military was for a civilian president.