President Ferdinand Marcos' proclamation ending eight years of martial law today does little to reduce the ruling powers of the authoritarian president, but diplomatic observers here are cautiously optimistic that it will provide an opportunity for new testing of personal and political freedoms.

Shortly after lifting martial law, Marcos freed 341 prisoners, including 159 held on national security charges, United Press International reported. The remaining 182 prisoners were held on common criminal charges.

[Marcos released the prisoners as part of his pledge to abolish 30 military tribunals set up to enforce martial law. The tribunals will be disbanded after deciding the pending cases of 1,500 civilians, he said.]

Marcos, who has been in power since 1965, signed the proclamation at the president's palace today in a ceremonial setting witnessed by ambassadors, the Cabinet and community leaders.

Since many of the stringent laws and decrees of the martial law period remain in effect, many analysts and critics of Marcos' rule say that the chief intent of the lifting of martial law appears to be to improve the Philippines' image abroad. Marcos is preparing to begin relations with a new U.S. administration and to receive Pope John Paul II on a long-awaited visit.

In a speech today, Marcos defended his decision to use the Army to impose martial law in September 1972 to prevent the nation from sliding into chaos and anarchy.

"The martial necessity has passed," Marcos said. "It has served well the purpose of a once-beleaguered people. It cannot go on, for a people must mature and must grow from outer discipline to inner discipline."

Nonetheless Marcos made clear that many provisions associated with martial law will remain. For example, habeas corpus remains suspended in crimes against security, strikes in vital industries are still banned, the military retains the right of arrest in rebel-wracked Mindanao in the south and it will not be removed from its public role and returned to the barracks.

Marcos had already revised the constitution to give himself absolute powers in the post-martial law period and immunity from suits during his tenure.

His action today, observers predict, will serve initially to remove the unsavory tag of martial law -- which had exposed Marcos to severe criticism among liberals at home and abroad -- but not the vestiges of his vast powers consolidated during the emergency years.

Marcos is seen to want to impress the United States, the Philippines' major ally. Washington has been concerned that increased polarization might lead to a breakdown in Philippine society, as has happened to other U.S. allies in recent years.

For Marcos, this might be an opportune time to start developing a better relationship with the Reagan administration. Ties with Jimmy Carter had soured on the issue of human rights.

Observers also think Marcos is anxious to present a picture of normalization before Pope John Paul II arrives for a visit to Asia's only heavily Roman Catholic country on Feb. 17. The Catholic hierarchy in the Philippines frequently has expressed concern about Marcos' human rights practices.

The United Democratic Opposition, a grouping of opposition political factions, called the end of martial law "a paper lifting." Two days ago they asked Marcos to resign and to set up a caretaker government to oversee the transition to democratic elections.

[The opposition Movement for a Free Philippines, in a statement released in Washington, accused Marcos of "cruel deception" for lifting martial law "without dismantling the institutions of dictatorship." It called for an end to "all repressive measures."]

Diplomatic observers see the abolition of military courts as the most visible sign of relaxation. The government-controlled television and newspapers have begun featuring opposition activities, a development also considered significant.

U.S. diplomats here view the lifting of martial law, even if it is only a limited move, as a first step in a long and delicate process. U,S. Ambassador Richard Murphy today called it "an important step in the right direction."