A federal judge today ordered the conditional release of nearly all the Haitian refugees held--some for more than a year--in detention camps while seeking asylum in the United States.

"It would not be just or equitable to require detention," U.S. District Judge Eugene P. Spellman ruled, because the government had violated its own immigration procedures by instituting the plan to incarcerate the Haitians without public notice.

The government asked for a delay and said it would appeal the decision.

"Because we did not give the world advance notice that our immigration laws were to be respected," Associate Attorney General Rudolph W. Guiliani said, "we have been told they must be ignored." Justice Department attorneys said the government is "absolutely committed" to detention during the appeal period.

Spellman imposed an "interim plan," which would eventually free an estimated 1,900 Haitians who arrived from the island republic beginning last summer.

He rejected both a Justice Department release plan and the Haitians' demand that the government return to its old policy of requiring only health clearance before releasing refugees seeking asylum while their cases move through the immigration bureaucracy.

Attorneys for the Haitians called the ruling a "major victory" and predicted some Haitians could be released as soon as next week. Chief attorney Ira Kurzban said advocates will ask Congress to consider amnesty for these refugees, some of whom have been incarcerated for 13 months.

But the government requested that the Haitians not be freed until its appeal has been heard. Giuliani called the decision "an overbroad and incorrect interpretation of the law that interferes with the operation of the executive branch."

Spellman said he would rule Wednesday on the request to keep the Haitians in jail.

Spellman's ruling was foreshadowed by his decision two weeks ago that the Immigration and Naturalization Service violated federal law when it began detaining newly arrived Haitian refugees in May, 1981.

He said the INS failed to give the public the required 30-day "notice and opportunity to comment" before implementing the new detention policy, instituted when the Reagan administration declared the country had "lost control of its borders."

A flood of Haitian "boat people" fleeing economic chaos and the repressive policies of dictator Jean-Claude (Baby Doc) Duvalier reached a peak in the last half of 1980, when 1,500 a month debarked on the Florida coast from jammed and leaking small boats. Many drowned en route, but about 5,600 Haitians are now living in the United States and asking for asylum. Countless more were deported when INS examiners, in rapid-fire hearings without attorneys present, found that they could not prove they would be in physical danger if returned to Haiti.

Spellman found no evidence to support the Haitians' claims that the government illegally discriminated against them on the basis of race or nationality. "That was the key decision in the case," insisted Giuliani at a Washington news conference. "The decision largely found the administration program fair and evenhanded."

The government will appeal because "we believe it establishes a precedent that anyone who presents himself without any intention of complying with the law is entitled to an automatic pass of three to five years," living free in the country while the case winds through the courts, Justice Department attorney Robert Bombaugh told the judge. "We cannot accept that."

"We will not retreat," he said later. "We will control the borders."

Yesterday's order covers all but 58 Haitians, who have filed a separate suit in Brooklyn.

Under Spellman's plan, each freed Haitian must have both a voluntary resettlement agency and an individual sponsor agree in writing to the terms of the order, including full weekly reports to third parties approved and appointed by the court.

The government had sought stricter parole provisions, including bail, contending that only about 25 percent of Haitians had showed up for scheduled hearings in the past. Guiliani said that if the government wins a stay, it will put its own plan with those requirements into effect while the overall appeal continues.

Representatives of many legal groups said they would try to provide free attorneys for the Haitians.

The judge also asked voluntary agencies to resettle Haitians "to the extent possible" outside Miami and Florida, the area where most of the estimated 150,000 Cubans, Haitians and other refugees have settled over the past two years.

The judge also asked the agencies to assume financial responsibility so that resources of local and state governments will not be further taxed.

Florida Gov. Bob Graham said the judge's order did not go far enough in requiring out-of-state relocation. The governor had asked that only Haitians with immediate families in Florida be resettled here.

Graham said the state would join the federal government in seeking a limited stay to prevent Spellman's order "from applying to anyone who illegally enters our borders in the period between the judge's ruling and the time the appeal is resolved."