The U.S. Immigration and Naturalization Service has quietly abandoned its policy of aggressively searching out illegal aliens within the United States, according to agency sources.

The massive raids on business and restaurants, the sweeps of whole blocks in ethnic neighborhoods, the random questioning of people with foreign accents or appearance are now largely "things of the past," in the words of one U.S. Immigration official.

"If they could," the president of the INS Council (AFL-CIO), which represents 5,300 INS employes and with exasperation recently, the service's administrators would "just about have an open door policy - come one, come all."

INS Commissioner Leonel J. Castillo has said he does not advocate such an approach, though he has long supported a policy of amnesty for many of the nation's illegals. He did say in a recent interview, however, that once an illegal immigrant gets past the border "the odds are that (he) won't be stopped. The odds (for being stooped) are not as great now as they were before."

While some arrests and deportations still take place - raids on Virginia and Maryland farms late in the summer were conspicuous examplex - Castillo has diverted most of the service's attention toward attempts to make the border more secure and to process applicants for such benefits as permanent residence and citizenship with greater speed.

Since his appointment in 1977 to succeed the hard-line administration of Gen. Leonard F. Chapman, Castillo has been at the center of one of the most volatile issues facing the United States.

The arrival of millions of illegal immrants over the last decade has been the subject of major controversy not only because they are seen by some environmentalists, labor unions and politicians as a threat to the U.S. standard of living, but because there is so little hard information about them.

Estimates of numbers vary tremendously, from 3 million to 10 million nationwide, with uncounted scores of thousands in the Washington and Baltimore areas.

Whether they hurt or in fact help U.S. society is constantly disputed. In a national poll taken last year by the Roper Organization Inc., an overwhelming 91 percent of its respondents said they favored an "all-out effort to stop the illegal entry into the United States of . . . foreigners who don't have visas."

Recent court decisions making it more difficult to search for, and question, suspected illegals, and congressional inaction on the Carter administration's proposed reforms of the immigration laws have further complicated the situation.

It is in the face of this philosophical and legal snart that Castillo has made such major revisions in the Immigration Service's priorities.

The result of this change has been a decline of this change has been a decline of approximately 16 percent in the number of illegal immigrants apprehended nationwide from fiscal year 1977 to fiscal year 1978.

In Baltmore and Washington the drop has been even more dramatic, though many INS officials believe the illegal population in this area is still rising. According to official INS statistics the number of arrests made in both areas so far this year is more than 40 percent below the level for the same period in 1976.

Castillo traces most of the responsibility for this to Congress and the courts.

Last month, for instance, a federal district court here in Washington ruled that the Immigration Service's use of a search warrant in a raid on Blackie's House of Beef was illegal since the INS investigators were seeking to arrest people rather than find evidence. Previously such warrants had been one of the agency's major investigative tools.

"To me Blackie's (the court decision) is an Indicator of the trend of judicial decisions that all point toward making it harder to stop people on the street without meeing very rigid criteria," said Castillo. "I think that given that trend and major manpower and money problems, that it makes more sense to have a prevention strategy."

But there is no clear indication that Castillo's prevention strategy is, in fact, working. Apprehensions at the Mexican border, where most illegal immigrants come into the United States, have indeed increased over the last year - from 812,500 to 862,200 - but whether this is a real reduction in the flow is an open question.

Castillo suggested that smugglers are now able to demand higher prices for their services and that is some indication of success. He said that the repair and contruction of new fences in populated areas - a total of about 35 miles worth along the 1,945-mile border - may be some help, but "we don't have good measures" to say whether the situation is improving or not.

One area where he does feel there are "dramatic gains" is in the delivery of benefits - that is, processing of legal immigrants.

"But we've had a curious phenomenon happen," said Castillo. "No one predicted it, least of all me . . . What we found is that if you naturalize more people you end up giving yourself more work, because every time you naturalize somebody they then are eligible to petition for immediate relatives and so on."

Such dilemmas, Castillo said, point to the "tremendous need for overhauling the immigration law," but so far Congress has taken very little action on the comprehensive reforms proposed by President Carter in the summer of 1977, which would have included a limited amnesty program and penalties for hiring illegal aliens.

The current situation is "casuing great disrespect for the law," said Castillo. "It's putting some of our officers in the untenable position of trying to enforce prohibition-type laws, where the community makes a lot of noise but really doesn't make a lot of push to really get them enforced, and where the penalties for a violation are such that everybody just comes right back. I think it breeds a bad situation."

Within the Immigration Service according to many employes, morale is at an all-time low. Part of the problem has to do with cuts in pay and attempts by the Office of Management and Budget to take the Border Patrol away from the INS and transfer it to the Treasury Department, which handles customs inspections.

But many also blame Castillo and his deputy, Mario Noto, for not allowing them to enforce even the laws that exit. At one INS distirct office last week three investigators in separate interviews, referred to the Mexican-American Castillo as "that wetback we have for a commissioner."

J.B. Hillard, president of the INS Council, said that around the country there is a mood of intense frustration among many INS investigators.

"If you're being held back from doing everything you can do while the problem is increasing - it certainly is not descreasing - all you have is more and more people coming into the country with less and less likelhood of being apprehended and deported," said Hillard.

"As far as I'm concerned, we're drowning and have been for several years. I said a few years ago it's like trying to bail out the Queen Mary with a teacup. It's like it's down to a thimble now."

Hispanic and other immigrant organizations, meanwhile, have attacked Castillo and the Carter administration for putting too much emphasis on enforcement and too little on what they consider the only real solution to the dilemma, which is to help create jobs and better living conditions in countries such as Mexico, where most illegal immigrants come from.

"What we've seen so far," said Al Perez of the Mexican-American Legal Defense Educational Fund, "are haphazard attempts to deal with the symptoms of the problem."

The Immigration Service also has problems, despite Castillo's efforts, living down a repuattion among immigrant groups for abuses of the people it apprehends.

"I think that the image of the Immigration Service has had a little improvement," said Silverio Coy, a local Hispanic community organizer in Washington, "but so many people have been treated so badly by them in the past that they are still afraid of them."

Castillo, caught in the middle of such opposing forces, said at the close of his interview, "I think I'm the only optimist in the whole place, and maybe that's because I don't know enough, but I do think that we can deal with the problems. I think that we can make these policy changes and that the Congress will vote in some changes and that the majority of the people will accept them, and finally we won't have to worry about whether we're enforcing the liquor laws at the tail end of prohibition."