The State Department, which narrowly escaped a crippling financial crisis in the fiscal 1988 budget, is preparing its campaign for when senior department officials say they will have to fight again to keep U.S. diplomacy functioning effectively.

"We got a stay of execution rather than a pardon," George E. Moose, the department's director of management operations, said of the catchall spending bill that Congress passed Dec. 22 to fund the government for the rest of the fiscal year.

At the last minute, Congress reversed its planned deep spending cuts and gave the department enough money to make up an anticipated $84 million shortfall in salaries and operating expenses.

That allowed Secretary George P. Shultz to shelve, at least temporarily, a budget-cutting plan that contemplated eliminating 1,270 jobs, about 8 percent of the department's work force, closing at least 13 embassies and consulates, and consolidating various functions in ways that department personnel said would have seriously impaired their ability to perform many diplomatic functions.

While most of these measures are no longer a threat, senior management officials warn that some of them may be revived in a few months when serious negotiations begin with Congress about the fiscal 1989 budget.

"Getting that extra funding did wonders for morale around the building," Moose said. "But there is a danger that the lift in morale will turn into cynicism about the process -- that everyone will assume that we'll be bailed out again at the last minute and that there's really nothing to worry about. If that happens, it will be increasingly harder to sell people on the idea that there are still many problems and that their cooperation is necessary to resolve them."

The reality, according to department officials, is that the ever-mounting pressure for fiscal austerity means that the State Department, like other federal agencies, must become accustomed to getting by on less.

The department came through the budget exercise reasonably intact because Shultz lobbied fiercely and because of extensive news coverage.

But among the compromises was an agreement between Congress and the White House that spending increases in fiscal 1989 will be limited to 2 percent over current levels. State Department officials say, however, that the decline of the dollar overseas and other factors mean that the department will require a 10.5 percent budget increase just to stay even.

That poses two major management problems. The department must continue the process, known in bureaucratese as "downsizing," that inevitably will involve substantial personnel cuts. And it must find ways to improve relations with Congress, whose increasing annoyance over many State Department practices is likely to make it less willing next year to treat the budget with last-minute benevolence.

The personnel problem comes about because State, unlike federal agencies such as the Defense Department with its vast array of sophisticated weaponry, essentially has no resources other than people, and thus has nothing else to sacrifice to the budget-cutting process.

Department officials say that because of the reprieve in the current budget, they are confident that personnel reductions can be achieved through attrition and early retirements.

Nevertheless, the officials stress, Foreign Service officers and civil service personnel must accept the morale-eroding inevitability of a smaller State Department where there will be fewer promotion possibilities and opportunities for challenging assignments.

The tone of mutual sourness between Congress and the department was brought into the open by Rep. Dan Mica (D-Fla.), chairman of the House Foreign Affairs subcommittee on international operations.

Speaking to the House during the final days of the budget debate, Mica charged the department's lobbyists with ineptitude in dealing with Congress and added: "There are some in the State Department and some in our diplomatic corps in the embassies who somehow feel that Congress is an unneeded attachment to American government, that we are a bother."

In part, his words accurately reflected the widespread feeling of many State Department officials that Congress consists of 535 frustrated secretaries of state. They mean that Congress not only is stingy with its foreign policy appropriations but also wants to direct that policy through legislation.

In the recently concluded congressional session, the number of what State Department officials privately call "nut case amendments" reached a near record. Usually most fail to make it into law or are saddled with qualifiers that render them harmless.

But a few always seem to get through. Congress included in the budget legislation a requirement that members of the department's Diplomatic Security Service be subject to polygraph tests, and a demand for closing the Palestine Liberation Organization's observer mission at the United Nations.

Tiffs over congressional attempts to manage policy are common to all administrations. They became especially intense last spring after Mica and Rep. Olympia J. Snowe (R-Maine), ranking minority member of the subcommittee, charged the department with laxity and lack of cooperation in the controversy over Soviet penetration of the U.S. Embassy complex in Moscow.

Department officials, led by Ronald I. Spiers, undersecretary for management, left no doubt that they thought Mica and Snowe weren't fully informed and were sensationalizing. Disagreements between the two House members and Spiers spread to other issues involving the budget and fell to a point that one senior department official privately called "sub-Arctic."

Further aggravating the situation has been a problem peculiar to the Reagan administration. Many of President Reagan's diplomatic policies and appointments have come under attack from the conservative wing of his Republican Party in Congress.

Some of these attacks, especially those led by Sen. Jesse Helms (R-N.C.), have been characterized by an extraordinary vehemence and tenacity that, if left unanswered, could damage administration policies. Yet it has become commonplace for the administration to depend not on moderate Republicans but on the Democratic leadership and committee chairmen in the House and Senate to defend its nominees and some of its policies.

Many Democrats say they are fed up because, they contend, the administration has not reciprocated with any willingness to compromise on issues important to the Democrats. Many congressional sources, noting that the State Department budget was rescued largely by the Democrats, warn that the administration could find the rival party in a more partisan mood on the next budget go-round.

The department is taking tentative steps to mend fences with Congress. Spiers is accompanying members of the House Appropriations subcommittee that oversees the department's budget on a lengthy trip to the Far East. He is also expected to give up the management post later this year, so that another official -- probably Thomas R. Pickering, now ambassador to Israel -- can take over and begin building a new relationship with Congress.

Mica noted the urgency of that task when he argued for increased department funding during House debate Dec. 15.

"I say to the State Department, to the people we are trying to help, wake up," Mica said. "The State Department may not have friends like they have in this Congress in the future if they do not develop those friends and work with them."