The United States has ordered two Nicaraguan diplomats to leave the country by Friday, calling the move a response to Nicaragua's claim in March that four U.S. diplomats had engaged in spying in Managua.

The Nicaraguans are William Vigil, a political counselor, and Miriam Hooker, first secretary for press relations. Manuel Cordero, political officer at the embassy, said he was summoned to the State Department last Friday and given a formal request that the two be withdrawn. Such a request is tantamount to expulsion.

"We think this is unjustified," Cordero said. "It is not an act of reciprocity, because the Americans were involved in activities that were in conflict with their diplomatic standing."

He speculated that Vigil and Hooker were named because they are equal in rank to two of the Americans. The State Department made no charges against them and said the action was purely reciprocal.

Nicaragua's Sandinista government charged on March 13 that the four Americans were intelligence agents who had suborned two Interior Ministry officials and spied on the government using sophisticated devices such as cameras disguised as cigarette lighters and ashtrays with secret compartments. The Interior Ministry officials were arrested. The U.S. Embassy denied the charges.

Two of the Americans left Nicaragua at the time of the announcement and the other two left later, although Nicaragua did not request their departure. State Department spokesman Gregory Lagana said yesterday that the charges of espionage "amounted to effective expulsion" of the two diplomats because it "exposed them to potential dangers" and "rendered them unable to effectively perform their diplomatic functions."

The United States routinely responds to foreign governments' actions against U.S. officials with similar acts here.

The U.S. response was delayed two months to allow the officials to leave and for possible responses to be evaluated, Lagana said. Cordero said his government had not announced the U.S. action immediately for similar reasons.

The two Nicaraguans have been in Washington about three years, Cordero said. Hooker is married to Francisco Campbell, a political officer at the embassy, but no decision has been made on whether he will leave with her, Cordero said.