For more than a year now, a ragtag group of young lawyers has held the whole U.S. government at bay, managing in case after case to thwart the Department of Justice.

Their efforts have prompted a Justice Department spokesman to declare: "We have lost control of our borders and our beaches. We have to do something about it and do it fast!"

They have caused President Reagan to deploy U.S. military might in the form of the Hamilton, a fully armed, 378-foot Coast Guard cutter into the territorial waters of another country: Haiti.

At issue are the Haitians who by the thousands have been packing themselves into small boats, many of them homemade and only 20 or 30 feet long, and making their way over 800 miles of open water for the shores of Florida.

The Hamilton began patrolling the Windward Channel early last week, looking for boatloads of Haitians with the idea of turning them back. But by week's end it had not stopped a boat, and no one was sure what would happen if it did -- or if the boat refused to stop.

The government says the Haitians are illegal aliens coming here to seek their fortunes and escape poverty in their island country. For the first time since Japanese-Americans were put into detention camps during World War II, the Immigration and Naturalization Service last July initiated a policy of putting the illegal aliens into prisons to await deportation hearings.

There are now about 2,700 Haitians in detention in the United States and Puerto Rico, and the government estimates that as many as 1,000 per month may be entering the country. The largest of the camps is the Krome Detention Center here on the edge of the Everglades, where 1,200 Haitians live in a concoction of barbed wire and concrete blocks on an old missile site about 45 minutes outside of downtown Miami.

The lawyers, generally working without pay, have insisted that at least some of the Haitians are political refugees fleeing the repressive regime of Jean Claude (Baby Doc) Duvalier and are entitled to full asylum hearings and full due process of law, complete with several layers of appeals.

So far the federal courts have agreed with them, often criticizing INS at length in the process.

"Fighting immigration is like shooting fish in a barrel. It's like the Selective Service in the '60s. They're portraying us as a group of smart lawyers that got together, but in fact the things they're doing are so blatantly illegal that they make it easy for us," said Ira Kurzban, who is leading the lawyers.

In fact, the government is faced with a near-impossible situation. At a time of limited resources and economic problems, it is clear that the United States can no longer welcome everyone who wants to come into the country. That question is complicated even further when the people pouring across the border are poor, often illiterate and don't speak English -- people who would present a further drain on already stretched social services.

Alan C. Nelson, deputy INS commissioner, says the Haitians who are coming have absolutely no legal right to be here, and by letting them in, the United States could be encouraging hundreds of thousands of others to attempt to get here.

But because of the lawyers, the Haitians who are coming illegally are perhaps being accorded more legal rights than those who obey the law.

To force the government to provide due process for the Haitians, the lawyers have raised not only the merits of the individual cases, but also virtually every possible legal issue to trap the government in its own bureaucratic tangle.

For example:

* At the Ft. Allen detention camp in Puerto Rico, a group of the lawyers forced the government to go through an environmental impact statement procedure because of the sewage that would be produced by the camp.

* Each time the government has made any policy change regarding the Haitians, the lawyers have sued to force the government to comply with its own rule-making procedures, complete with publication in the Federal Register with the required 30 days for public comment.

* The lawyers have presented evidence -- and convinced a federal judge -- that the government translators have been so bad that instead of asking the Haitians if they were seeking political asylum, they were asking them if they wanted to go to the insane asylum.

* The lawyers repeatedly have been able to stop deportations, often at the last minute, by persuading a federal judge that the INS has violated the Haitians' rights.

* Even the state of Florida has gotten in on the act by filing a suit against the government alleging not only overcrowding but also "neglect and indifference" by federal officials. Florida is asking that Krome be shut down and that no new camps be opened in the state.

Besieged by all the lawsuits, the government has engaged in a kind of guerrilla warfare, going as far as rushing groups of Haitians up back stairways into locked courtrooms to avoid lawyers lurking in the hallways.

The latest INS tactic is to schedule hearings for the Haitians at Miami's Krome Detention Center simultaneously in three courtrooms even though they're all represented by the same lawyer from the Haitian Refugee Center. That forces the lawyer, Steve Forester, to race wildly from courtroom to courtroom, begging for continuances that the government has no intention of granting for his 600 clients.

"They've said it's my own fault for taking too many clients . . . but they know very well that there aren't other lawyers, and if we didn't represent these people, they would simply be deported," Forester said.

Nelson said his agency has decided to go full speed ahead with the hearings because the lawyers "will win if the system is bogged down. They're winning now on the procedural rules, not on the merits.

"They've come in and said they have a monopoly on the Haitians, but then they hold up the flow. It's really an antitrust situation. . . . They should either fish or cut bait," said Nelson, who believes the lawyers are deliberately dragging their feet. Haitians, he said, "don't have the right to free counsel. In most other countries in the world, they would have been herded back into the boats and put out to sea."

Nelson charged that there are a number of Haitians who would rather return home than stay in detention, but the issue is so tied up in litigation that it is impossible for anyone to be moved.

Forester retorts that the INS deliberately created the problem when it moved the hearings from downtown Miami to the detention center. Most lawyers don't want to drive that far, he said, though there are 25 lawyers who would provide free services for the Haitians downtown.

Brian McDonald, the first assistant U.S. attorney in Miami, also contends that the lawyers have resources unavailable to the INS. "Some of them are professors at a law school, and they can get assistance from their students," he said, while the INS is "understaffed, they've gotten conflicting policy guidance, and they're confronted with difficult problems."

The lawyers' efforts have been two-pronged. On one side Kurzban, aided by two University of Miami law professors, their students and an assortment of other lawyers around the country who donate their time, have worked on their own time on a series of class-action cases to help thousands of Haitians who are here illegally.

The other side of the effort is being carried on by Steve Forester and Vera Weisz, working out of a ramshackle storefront office in Miami's Little Haiti area. They receive nominal salaries from the Haitian Refugee Center, which operates from year to year on a grant from the National Council of Churches.

Among the questions the lawyers are raising in their lawsuits are some that have sticky policy implications for the government.

For instance, Kurzban asks whether the United States should routinely grant asylum to Soviet ballet dancers, who lead privileged lives in their own country, while it turns away refugees who happen to be poor and uneducated.

He questions whether the country should have an immigration policy that welcomes people fleeing from communist governments while it turns away those fleeing right-wing dictatorships that happen to be friendly to the United States. In this case the government also has to deal with the uncomfortable fact that it has recently allowed entrance to large numbers of Indochinese and Cuban refugees, many of them coming for economic reasons, and now is in the process of turning away the first large group of refugees who happen to be black.

Finally, even if the Haitians are eventually returned to their home country, Kurzban asks, "Shouldn't they be entitled to a fair hearing on their asylum claims?"

Behind high chain-link fences topped with barbed wire, the 1,200 Haitians being detained at Krome spend their days sprawled on bunks and makeshift cots so close that it is difficult to walk between them. The men are kept on one side of the camp and the women and children on the other, separated by another metal fence.

The camp's single, conventional-sized washer and dryer have been shut off -- the area is so swampy that it was impossible to use them. The Haitians use portable toilets lined up against one of the fences. The showers are open for two hours in the morning and two in the afternoon.

Laundry is set out to dry on the scraggly patches of grass and on the metal fences. What possessions the Haitians have are stored in clear plastic bags, one stacked neatly on each bunk.

Virtually none of the Haitians speaks English, and there are only 10 translators at the camp to decipher their Creole dialect.

Early last month, there were riots at Krome as the Haitians chanted "liberty or death" and "Miami is my country." But the instigators have been shipped off to more secure facilities and most of the Haitians spend their days now doing no more than staring vacantly into space.

To help ease crowding in Florida, INS recently moved the majority of the Haitians to facilities in out-of-the-way places like Lake Placid, N.Y.; Big Springs, Tex., and Ft. Allen, Puerto Rico, far away from any Creole translators and any sort of free legal representation.

At a recent Senate hearing, Doris Meissner, the acting INS commissioner, said that the Haitians are generally considered economic refugees who can be returned safely to their country of origin. As such, she said, they are not eligible for asylum.

In response to pointed questioning from Sen. Charles Grassley (R-Iowa), Meissner said there is "no concrete evidence" that the Haitians would be persecuted if they were returned, and a State Department representative said the Haitian government has promised that there will be no reprisals against those who return.

But U.S. District Court Judge James Lawrence King, in a decision last year in Miami, found major problems of political persecution in Haiti, including persecution of those who have fled and then returned to the country.

"This case involves thousands of black nationals, the brutality of their government, and the prejudice of ours," said, King, a Republican appointed by Richard Nixon, noting that the Haitians are "fleeing the most repressive government in the Americas."

King listened to weeks of evidence of beatings, torture and deaths in Haitian prisons and he concluded that "the manner in which INS treated the more than 4,000 Haitian plaintiffs violated the Constitution, the immigration statutes, international agreements, INS regulations and INS operating procedures. It must stop."

It was the first major victory for the small group of lawyers who have taken on the Haitians' cause.

Early last month, the lawyers won another victory when federal Judge Alcee Hastings in Miami issued a temporary restraining order barring deportation hearings for Haitians who are not represented by lawyers.

But that victory was clouded when Hastings later became the target of an FBI bribery investigation, stepped down from the bench temporarily and asked to have his cases reassigned. No one is sure what will happen to the Haitian case that was still pending before him.

Meanwhile, both sides are waiting to see what's going to happen with the Hamilton as it patrols the Haitian waters, and the lawyers are trying to decide whether to file yet another lawsuit to stop what they call "the kangaroo court on the high seas."

No one knows for sure what the Hamilton would do if one of the Haitian boats refused to stop and decided to make a run for it. Would the 378-foot vessel ram it? Open fire with the cannons? Sink it?

There also are questions about what will happen to those Haitians who are educated enough to know they have a right to ask the Coast Guard for political asylum. The United States is bound by a United Nations treaty not to return persons to a country where they will be persecuted. But although there will be translators and immigration officers aboard the Hamilton, no one is sure yet how the Haitians can prove they would be persecuted at home.