Late last year, liberal Democrats howled in protest when the House Democratic leadership negotiated with the Reagan administration a budget compromise that included $8.1 million in nonlethal aid to the Nicaraguan rebels and a guaranteed showdown this week on whether to provide them further military aid.

The liberal Democrats charged betrayal. "We've taken a pig and dressed it up in a tuxedo, but it's still a pig," said Rep. Robert J. Mrazek (D-N.Y.).

But for Mrazek and other opponents of the Reagan administration's policy of arming the contra rebels fighting the Marxist government in Nicaragua, that pig has turned into a comely beast after all.

The seeds of Wednesday night's 219-to-211 House vote that killed the president's $36.2 million contra aid request were sown by that December compromise. The rigid schedule and ground rules for the showdown vote -- which ultimately played a significant role in determining the outcome -- were established by the compromise.

Although the Senate approved the package 51 to 48 last night, it was only a gesture because a rejection by either house meant the proposal is dead and cannot go to a conference committee under the special procedures set by the compromise.

Nonetheless, White House spokesman Marlin Fitzwater said the administration was "gratified" by the Senate vote and said it sends a signal to Nicaragua that "American leaders remain concerned about the peace process and will be watching its progress very carefully."

It was the administration's willingness to agree to a decisive, early vote on the president's request for military aid with no amendments or substitutes that "bought our victory," said aid opponent Rep. Tony Coelho (D-Calif.), the House Democratic whip.

Opponents of contra aid also benefited from two other events -- one beyond their control and one of their own making. Nicaraguan President Daniel Ortega made unexpected concessions to the Central American peace process and the Democratic leadership announced it would offer an aid package of its own, containing only humanitarian assistance, following defeat of the president's package.

Neither eventuality was anticipated by administration supporters in December. The administration then appeared to have gained strength for its position largely as a result of the explosive revelations of a high-level Nicaraguan government defector, Maj. Roger Miranda Bengoechea.

In a well-orchestrated round of interviews, Miranda disclosed that the Marxist Sandinista regime had plans to raise and equip a 600,000-man army, a revelation that initially seemed to bolster the administration's argument that only continued military aid to the contras could stop the growth of an expansionist communist state in Central America.

But the impact of the Miranda disclosures was submerged by events.

In mid-January, at a meeting of the five central American leaders to assess the six-month-old peace process, Ortega announced several measures to comply with the plan, including suspension of the nationwide state of emergency, the beginning of direct negotiations with the contras and a promise to release 3,300 political prisoners. Oscar Arias, the Costa Rican president who authored the peace plan, continued his opposition to the contras.

The result, said Rep. Mickey Edwards (R-Okla.), who led the effort on behalf of the administration's aid request, was to give political cover to some of the few truly undecided members of the House.

"It was a difference of a few swing votes, it didn't take much," said Edwards. "It was this thing of 'give peace a chance.' People wanted to sincerely believe that. Others, it gave them the out they needed."

The Democratic leadership's decision to sponsor its own package of humanitarian aid if the president's plan was defeated came one week before Wednesday's vote and also took some steam out of the administration's effort to woo moderate lawmakers.

Republican legislators had been urging the president to structure his request in a way that would allow Congress to block the $3.6 million in military aid if the president authorized its release in April.

But it was not until the night before the vote that Reagan overcame his opposition to giving Congress that option, and his last-minute offer carried little weight because the option he proposed could have been easily blocked by a Senate filibuster.

"It wasn't enough," said Edwards. "He always fell one step short."

It fell short for at least one Republican, Rep. Paul B. Henry (Mich.) who joined 11 of his GOP colleagues in opposing further aid. Henry said he might have voted with the president had the package included an affirmative role for Congress in releasing the military aid and if the "nonlethal aid had been honestly packaged."

Democratic leaders now face what might be the even more delicate task of building a coalition for the humanitarian aid proposal. Their liberal wing is deeply suspicious of any additional aid of any kind, and many Republicans seem disinclined to help them out.

House Speaker Jim Wright (D-Tex.) yesterday said the specifics of the package will emerge after consultations with Republicans and members of the Senate. He promised the proposal would include some role for international organizations in delivering or inspecting the aid and that it would be "harmonious" with the peace process.

Yet if there is no cease-fire in place in Nicaragua, it would be hard for Wright to convince liberal Democrats to support further humanitarian aid.

"I think it's going to be difficult," said Rep. George Miller (D-Calif.). "We're not going to have Democrats feeding them {the contras} so they can keep killing civilians. It's going to have to be consistent with the peace process."

Those concerns were relayed to Wright in a Jan. 29 letter from Rep. Mike Lowry (D-Wash), chairman of the liberal Democratic Study Group. "Many, if not most, Democratic members would not be able to support a measure which permitted or facilitates a continuation of the war in Nicaragua," Lowry wrote.

He added that a humanitarian package limited to food, clothing, shelter and medical supplies would be acceptable only if a cease-fire is in place or the contras are not engaged in offensive operations, if it is limited to 60 days, if is approved by the presidents of the four Central American democracies and if no U.S. agency is involved in delivering it.

A potential further complication on the humanitarian aid proposed surfaced yesterday in the Senate, which launched into its symbolic debate and vote on the president's request.

Senate allies of the president's said that a House-passed humanitarian aid package would almost certainly attract a military aid amendment when it comes to the Senate.

"There will be a lot of amendments, amendments by the dozens," said Sen. Alan K. Simpson, (R-Wyo.), the assistant Republican leader. "Without exception, military aid will be part of that."