Despite a strong surge of antitreaty feeling here, Panamanian leader Gen. Omar Torrijos reportedly is confident that he will gain a comfortable majority to ratify the new Panama Canal pacts in a nationwide plebiscite Sunday.

Nonetheless, Torrijos had made a hectic last-minute round of campaigning in the last few days telling Panamanians in television appeals and public speeches that the treaties would bring them prosperity, full employment and U.S. protection from foreign aggressors.

An estimated 788,000 Panamanians - about half the population - are eligible to vote. They have been under heavy government pressure to vote approval of the pacts, the product of 13 years of difficult negotiations with Washington.

Preliminary results are expected to be available late Sunday night but official returns will not be announced until Thursday.

Voter approval here will constitute ratification of the treaties by Panama but U.S. ratification - by a two-thirds vote of approval in the Senate - is expected to be much more difficult to achieve.

The plebiscite has been billed here as the "most significant event since our independence." Torrijos has publicly predicted he will get 90 per cent of the vote.

Privately, however, Torrijos and other government officials are known to be concerned over the unexpectedly strong opposition voiced in recent days in the capital and other major cities. Since taking power in 1968 in a military coup, the Torrijos government has rarely had to submit to public scrutiny and it clearly feels its prestige is at stake in Sunday's vote.

The treaties, signed by Torrijos and President Carter in Washington Sept. 7, provide for U.S. surrender of the waterway to Panama by the year 2000. They also declare the canal a neutral zone and provide for U.S. military intervention if its security is threatened.

At the government's invitation, six United Nations officials and about two dozen North and South American university rectors have come here as observers of the voting.

For the politically backward, officials have been distributing thousands of comic books explaining voting procedures. A small manila envelope is to be stuffed with one of two ballots: one yellow, reading "si," and a white one reading "no". A favorite joke around town is that there will indeed be two sets of ballots; one saying "si" and the other "yes."

The measure of official concern became clear this week as radio and TV stations and newspapers began to receive calls from the National Guard - which embraces the country's armed forces and police - with instructions that free air tune and newspaper space for treaty debates was no longer available. In the last few days the media have produced little more than a barrage of official pro-treaty advertising. A number of opponents charged that their statements and announcements of meetings have been turned down by the press.

The question of the U.S. right to take military action to defend the canal has caused as much controversy here as it has in Washington. In the past Torrijos has lamented this U.S. demand as the price Panama has to pay, but in a television speech two days ago, he made a surprising turnabout in explaining the advantages of U.S. defense.

In case of an attack, Torrijos said, "if we push the button here, the bell rings there, and they come to defend the Panama Canal."

Torrijos said he was not ashamed of being under the American defense umbrella, "because I do not want to free myself from the threat of an alligator, only to be threatened by a shark."

The next day, speaking before a group of industrialists, Torrijos warned that if the U.S. Senate did not ratify the Panama Canal treaties, then Panama might have seek the help of "another superpower."

In response to critics who have charged that the treaties will strengthen his authoritarian military government, Torrijos said that newly available U.S. loans would not be used to buy arms for the National Guard.

"We are not thinking (of buying) tanks but of buying tractors . . . to attack the river which has killed so many children, to attack the river with a bridge."

As for U.S. military bases in the Canal Zone, Torrijos said, "They will be turned into children's nurseries."

Today, in a speech at Colon at the Atlantic end of the canal, Torrijos told a cheering crowd that the treaties would bring funds to Panama for new housing. He said Panamanian control of the docks would allow the country to increase its foreign trade.

The treaty would "end unemployment," he told the crowd, emphasizing that the high-paying jobs now held by Americans could be spread among three times as many Panamanians.