"It will not be easy once the treaty is signed," Panama's head of state, Omar Torrijos, reflected from his hammock during a recent interview. "There will be a vast political vacuum we will have to fill. I am thing a lot about that. We will no longer have the Gringos to blame then."

Negotiators for the United States and Panama have agreed on substantial portions of a general Panama Canal treaty ending U.S. Jurisdiction over the canal and guaranteeing its neutrality, informed sources close to both sides have reported.

For almost nine years, since Brig. Gen. Torrijos took over the government in a bloodless coup, his battle to gain control over U.S.-owned Panama Canal has served as a near-guarantee for his political survival. The struggle took on such importance, in fact, it led to speculation that the ruler's future would be better served by an American enemy than by an American treaty.

If ever there was truth in that, the situation has now changed drastically. As Torrijos' own remarks indicate, he and a team of advisers are dealing matter-of-factly with the likely with drawal pains of a post-treaty period. The consensus within and outside the government is now that without the victory of an early treaty Torrijos will be fighting for his political life.

Nearly a decade of ample promise and little achievement on the canal issue combined with the most serious economic crisis in 20 years, have seriously eroded the general's position.

Dissatisfaction among the left, it is feared, may lead to more street disturbances of the kind he had to put down forcibly last Fall. But the toughest pressures come from Panama's influential businessmen and bankers, who look to a new treaty as the only way to revive the depressed economy.

So far , Torijos has successfully fought off challenges to his rule from rivals in the National Guard and, in his own words, "survived a destabilization effort directed by the White House but interrupted by Watergate."

He has also managed to preempt organized civilian opposition by sending the most active opponents on left and right into exile.

"But people are tired now, and they can't all be shipped abroad," said one long-time Panama watcher. "They may not be that unhappy with Omar, but they are unhappy, period."

The world recession hit hard in this country, whose economy is so closely geared to international trade. But while last year international trade increased 10 per cent, own gross national product registered no growth.

The economic slump prices has driven up Panama's prices, brought new taxes, a total halt in the recently booming construction industry, and high unemployment. Investment, both domestic and foreign, has been virtually suspended.

Inevitably Panama's poor majority blames the high cost of living on the government, while the private sector holds Torrijos "leftist policies" responsible for the recession. But even conservative economists here concede that Torrijos has gone out of his way to encourage business, which enjoyed record profits from 1970 to 1974.

Now the government has been forced to cut back on deficit spending as commercial banks have become reluctant to increase the country's foreign debt.

Panama's more dispassionate foreign business community is less inclined to blame Torrijos nationlist but economically pragmatic government for all the current ills. Yet, as one spokesman for the group explained, there is unanimous agreement that only a canal treaty can bring an upswing in the current slump.

Next to all this gloom, however, there is also an air of expectancy about the vast potential for growth and revenues once a treaty, or part of it, goes into effect.

As a U.S.-trained economist here pointed out, the canal and its operations have been restricted to being a nonprofit organization by act of Congress.

Once a new treaty removes this barrier, Panama will have access not only to tolls but also to profits of the Canal Zone's companies. Moreover, the country will be able to develop new industries such as shipbuilding and repair and drydocks, which are nonexistent now.

Many of the non-essential operations of the canal, now controlled by the U.S. government, such as the terminals division, stevedoers warehousing and tug and launch services, will pass into Panamanian hands. These areas are regarded as potentially immensely profitable.

The panamanian government also expects to receive significant tax income from the many current activities in the zone such as packing, trucking, shipping and other services in the hands of private firms which have escaped taxation until now.

But, one economic expert here commented, "There are many people making eyes at Zone as a sort of easy gold mine, but all this will require much time and expertise."

"The important thing however," he added," "is that a new treaty will change the momentum and, however slowly, that will be the only way out of the economic deadlock we are in.'

Some of the pressure Panamanian businessmen are putting on the Torrijos government, observers here believe , is aimed at assuring themsleves a large slice of the cake once the Canal Zone or its enterprises are ready for carving up.

A recent meeting of businessmen, for example, demanded that Torrijos define himself ideologically at last. This was taken here as tantamount to a request to have him place most of the newly available business in private hands.