Last October, a judge in a small-town South Carolina courtroom ordered a 54-year-old waitress to take a day off from work and travel to Baltimore to testify before a grand jury.

A Maryland prosecutor had come to South Carolina because the woman, Ann Carnaggio, was contesting the subpoena compelling her testimony. The prosecutor had spared nothing: offers of immunity, a prepared check for $119 to cover her airfare, promise of a state police escort from the airport, and the determination to fight numerous court battles for her appearance and the appearance of witnesses from up and down the entire East Coast.

Judge O. A. Rankin sided with the prosecutor but not without comment. "I don't mean to tell you-all how to run your business," he told the Marylander. "But to bring (a grand jury) together just for what Miss Carnaggio knows . . . no wonder government costs so much. I'm just glad that tax-payers of South Carolina and Horry County aren't having to pay your tax bill."

It was but one small skirmish in the grand jury investigation of the Catholic charity, The Pallottines Inc. - unquestionably the most extensive criminal probe to date in Maryland. Not even the investigation of suspended Gov. Marvin Mandel, handled by the U.S. Attorney's office in Baltimore, matched the scale and complexity of this year-long probe by the Maryland attorney general's office that led to the indictment of the Rev. Guido John Carcich. On Jan. 6, the priest was charged with embezzling $1.4 million donated for the poor and hiding some $15 million in secret bank accounts.

There were hundreds of subpoenas issued, some sent as far away as Europe. One day alone 50 subpoenas were sent to people like Carnaggio by the office of Maryland's attorney general.

Documents were brought in by the truckload and stored in filing cabinets that overflowed to the point where the office lobby had to be used for storage space. An unprecedented numberof witnesses were granted immunity from prosecution.

An entire new team was set up to handle the investigation for the attorney general's office.

Four full-time accountants were hired to analyze these documents. State police officers were detailed to the team along with two additional transferred from other state agencies.

A highly skilled team of investigators; shower of subpoenas: The liberal granting of immunity as a way of compelling testimony before a grand jury. It was a formidable display of firepower of the sort that is becoming increasingly common in corruption investigation.

In this investigation, as well as in others, defense attorneys are developing their own weapons, waging their own form of legal guerrilla warfare designed to stall and divert. Yesterday, as a result of the latest such thrust by the defense, Baltimore Judge Robert L. Karwacki withdrew from the case because he had been the supervising judge for part of the grand jury investigation.

The tactics of Carcich's defense lawyer, Brendan L. Sullivan, may have also set some sort of record. Meyer M. Cardin, the first judge to supervise the grand jury in the Pallottine investigation, said that in his 16 years on the bench he had never seen so many objections raised by the defense.

One source close to the case said "everthing that Sullivan client had any interest in, he would fight us on appeal."

The defense objected to subpoenas for records of businesses that received Pallotine money. They objected to calling in witnesses who might corroborate the priest's role in these businesses and they objected, most strenuously, to subpoenas for records of the religious order itself. The lawyers also objected to specific tactics used by the prosecutors during the investigation.

Several of these objections were taken all the wa up to Maryland's highest court, the Court of Appeals, in a time-consuming and expensive litigation that produced hundreds of pages of transcripts.

Defense attorneys objected to the use of an audit commissioned by tha Pallottines for fear that it may be self-incriminating. As it turned out, the 61-count indictment bears little resemblance to the audit of the charities that so worried Sullivan.

"Stumbling blocks, you name it," complained one source close to the prosecutors. "They (defense) fought tooth and nail for every single shred of evidence. It should be an ugly trial."

Ann Carnaggio did figure in the indictment but only marginally. A bank account with a balance of from $20,000 to $40,000 was allegedly maintained for her by Carcich.

Still, prosecutors in the office of Maryland Attorney General Francis B. Burch did not give a second thought to their great efforts to win her testimony or to the fact that, with an appeal, she successfully stalled and never appeared before the grand jury.

The grand jury was convened January 1977 after a full year of investigation without a grand jury. It was extended once because of the "extremely complex" nature of the probe, prosecutors said at the time. Attorney General Burch said the investigation would continue even after the indictments were returned this month.

The complexity stemmed from the large amount of money about $16 million - invested by Carcich in ventures that often did not bear his name. In his indictment, some 17 companies or bank accounts were listed for the source of "misappropriation of hidden interests in partnerships."

To ferret out those interests, sources say, the investigators had to make duplicate analyses of ledgers and records and often subpoena witnesses to discover how Carcich invested money in a particular firm. Unhampered by routine requirements, his investments could be made in other names and not reported since the money came from a religious charity.

Once, grand juries only heard the evidence after it had been collected by prosecutors independently. Judge Cardin said that although he did "not mean to say there is anything wrong with using a grand jury" as it was used in the Pallottine investigation, he commented how a normal Baltimore grand jury regularly indicts 20 to 30 people a day - not one in one year.

"A lot of things were unusual about the case - for one thing there were so many attorneys involved. But what made it so difficult was there were so many motions filed, 20 to 25 motions objecting to the presentation of evidence," said Cardin, who retired last fall.

Sources close to the prosecutors say Sullivan was effective in slowing down the investigation with these motions and, at times, blocking the avenue of inquiry.Prosecutors responded, sources say, with an unprecedented number of grants of immunity. In other words, if a witness was reluctant to testify or threatened to fight in court a request for documents, the attorney general's office would offer the witness immunity from prosecution for any crime involved in the Carcich investigation.

Still, defense attorneys fought back. Donald E. Webster, Carcich's adviser and accountant won at least one battle. Last summer, his attorney accused the chief prosecutor, Robert C. Ozer, of giving secret information from the grand jury investigation to the Internal Revenue Service.

"Equally as shocking . . . is the revelation that that office (attorney general's) has revealed to the Internal Revenue Service, and possibly to others, the scope and subject matter of this investigation," said Donald E. Sharpe, attorney for Webster.

Judge Cardin ordered the IRS to purge its records of the information gleaned about Webster and others through the "unlawful beach of secrecy of the Baltimore City grand jury" by Ozer. Secrecy remained a paramount concern during the rest of the investigation. The judge who took over after Cardin retired issued a special order underlining the need to keep all records and transcripts of the hearings sealed and for all attorneys to be silent about the proceedings.

Until the day that the indictment was issued, however, defense attorneys had not let up on their stalling tactics. The prosecutor's chore of tracing the money from donation to hidden business interest depended not only on the skills of the accountants but on testimony from witnesses who could interpret unusual ventures.

One such witness subpoenaed was Ann Carnaggio and her successful maneuvers were typical of the feats performed by both sides.

By the time Bruce C. Spizler, an assistant attorney general for Burch, journeyed to South Carolina to bring Carnaggio the case was close to completion.

He had gone with local sheriff's deputies to her townhouse and she only reluctantly accepted the subpoena. Hearings were scheduled to quash it.

Standing before Judge Rankin, Spizler said the case was "extremely complex," one that had already taxed the grand jury members. Any inconvenience Carnaggio might suffer must be weighed against the inconvenience of these 23 Marylanders, he said.

According to court documents, Spizler alleged that Carnaggio was involved because a bank account was discovered, maintained from July through October 1972 by Carcich as "trustee of Ann Carnaggio." The waitress acknowledged just about everything but the bank account. Yes, she had known Carcich since 1946, the corresponded monthly and he was her spiritual adviser.

It was also true, she said, that Carcich had asked her not to write letters once he feared he was under investigation. She knew she was offered immunity to testify before the grand jury but she still protested.

Even though the judge showed some sympathy, he signed the order. Carnaggio's attorneys, though, appealed the decision and the hearing was still pending when the indictment was issued.