Nicaragua's preliminary victory over the United States in the World Court last week was engineered by a largely unknown Washington lawyer who left jobs at two prestigious law firms as he persisted in representing the Sandinista government.

The story of Paul Reichler, 37, is partly a rerun of David and Goliath, partly an illustration of the reluctance of large, prominent law firms to become involved in politically controversial litigation.

The World Court accepted the suit Reichler helped draft that demands a halt to U.S. support for "military and paramilitary activities" against Nicaragua's Sandinista government. The court rejected the U.S. contention that it does not have jurisdiction in the case.

Reichler's association with Third World law began shortly after the Sandinista takeover of Nicaragua in 1979. The new government hired the Washington firm of Arnold & Porter to try to recover national wealth that dictator Anastasio Somoza had spirited out of the country.

The case was assigned to William D. Rogers, an Arnold & Porter partner and a former assistant secretary of state for Latin America. Reichler was asked to assist Rogers.

Reichler left the firm two years later, taking the Nicaraguan account with him.

He said that "it's fair to say that after the Reagan administration came to power, and U.S. policy toward Nicaragua changed dramatically, there was less enthusiasm at Arnold & Porter about representing Nicaragua."

Rogers said of Reichler's departure, "We didn't throw him out." He added that the Nicaraguan government continued to work with Reichler because he had been the lawyer most involved in the case.

Reichler was offered a partnership in the Washington office of Powell, Goldstein, Frazer & Murphy, the Atlanta-based firm whose partners include Stuart Eizenstat, domestic policy adviser to President Jimmy Carter.

By mid-1983, as the Reagan administration was continuing to escalate its support for the "contras" in their efforts to overthrow the Sandinista government, Reichler began to urge Nicaraguan officials to consider filing suit against the United States in the World Court, known formally as the International Court of Justice.

After the October 1983 U.S. invasion of Grenada, Reichler said, Nicaraguan officials feared their country might be invaded. "They saw that international law could be the salvation of Nicaragua as a sovereign state and might be the only available salvation," he said.

Reichler and Carlos Arguello Gomez, then Nicaragua's justice minister, began assembling a legal team that eventually included professors Abe Chase of the Harvard Law School, Ian Brownlie of Oxford University and Alain Pellet of the University of Paris.

But, the partners in Reichler's law firm voted not to go forward with the lawsuit. Reichler and colleague Judy Appelbaum resigned and started a firm.

Mike Chanin of Powell, Goldstein said, "Paul wanted to take the case. The firm felt it was not in the scope of the work we wanted to be doing for Nicaragua."

Reichler calls leaving Powell, Goldstein a "decision that would define me . . . a commitment to clients and commitment to opposing an unjust U.S. foreign policy that is killing innocent people."

Before Reichler finished drafting the complaint, the news broke that the Central Intelligence Agency had helped mine Nicaraguan harbors. After a quick redraft, the complaint was filed in the World Court's headquarters in The Hague on Monday, April 9.

The previous Friday the State Department had attempted to make a preemptive strike by withdrawing from the World Court, despite the 1946 treaty in which the United States agreed to give six months' notice if it decided to withdraw from the court's jurisdiction.

On May 10, the court unanimously ordered the United States to "immediately cease and refrain from any action restricting, blocking or endangering access to or from Nicaraguan ports."

By 14 to 1, with the American jurist dissenting, the court ordered the United States to halt support for military actions threatening "the sovereignty and political independence" of Nicaragua.

The court then took up the question of whether it retained jurisdiction after the U.S. attempt to withdraw.

On Nov. 26, the court unanimously decided to accept the Nicaraguan case and ruled, with the American judge again dissenting, that the court has jurisdiction over the United States.

The court must now decide whether U.S. mining of the harbors and financial support for the contras violate international law. If the court decides in favor of Nicaragua, the United States could face large fines, even though aid to the rebels since has been forbidden by Congress.

The Reagan administration has not announced whether it would abide by the World Court decision. If it refuses, the United States would join Iran, Iceland and Albania as the only countries to defy the World Court in the 42 rulings it has handed down in the past four decades.