Spiro T. Agnew was ordered today to pay the State of Maryland $248,735 -- the money, including interest, that a county judge rules Agnew owed because of kickbacks he allegedly received while governor and vice president.

Anne Arundel County Circuit Court Judge Bruce C. Williams ruled in a civil lawsuit against Agnew that the former vice president "breached his public trust" by accepting payments in exchange for state engineering contracts. Stating that "Mr. Agnew had no lawful right to this money under any theory," the judge ordered him to pay the state $147,500 for the kickbacks and $101,235 in interest, which had accumulated at 6 percent a year.

Agnew did not make an appearance at the trial here in a courthouse that stands only a few blocks from his former State House office, and he could not be reached for comment today. His lawyer said the ruling would be appealed in the state courts. Until the appeals process is completed, Agnew will not have to pay any of the money.

"This ruling will be a message to public officials in the future that they can't take it with them," said David Scull, a lawyer representing three taxpayers who brought the suit against Agnew and were later joined by Maryland Attorney General Stephen Sachs.

Agnew resigned from the vice presidency on Oct. 10, 1973, pleaded no contest to a single criminal tax evasion charge and paid a $10,000 fine when confronted with allegations that he had taken part in the kickback scheme. Three years later, three Maryland taxpayers filed the civil lawsuit attempting to collect the alleged kickback money for the state treasury. Today's ruling was the culmination of that protracted legal struggle.

If Agnew pays the state the quarter-of-a-million dollars, he apparently will be allowed to claim a federal income tax deduction for both the interest and the repayment of the alleged kickback money, according to tax experts. Generally, when a taxpayer repays illegally obtained money, he may claim a deduction for a "loss incurred" in a transaction. Depending upon Agnew's tax bracket, the deduction could be of substantial value to him.

The weeklong proceedings in this civil case in a sense became the public trial that Spiro T. Agnew never got when he was allowed to plead to the tax evasion charge in a historic 30-minute hearing in U.S. District Court in Baltimore more than seven years ago. The Annapolis case this week produced new revelations about Agnew's financial dealings and the Justice Department case that drove him from office.

As the trial began last week, it was revealed that Agnew had already paid about $172,000 in state and federal taxes, interest and penalties on unreported income he received between 1967 and 1972.

And in the most dramatic testimony produced in the trial, Agnew's former attorney stated that Agnew admitted eight months before resigning the vice presidency that he had taken cash kickbacks from close associates and said the practice had been going on "for a thousand years." That testimony by attorney George W. White about a February 1973 conversation with Agnew marked the first time that anyone had asserted that Agnew admitted to the kickback allegations.

In his 1973 court appearance Agnew denied that he was guilty of anything but the single charge of income tax evasion. He said that he had never conducted his public duties in a way that would harm the public interest and asserted that his acceptance of "contributions" while governor "was part of a long-established pattern of political fund-raising in the state." He continued to maintain his innocence in his autobiography, "Go Quietly . . . or Else," which was published last year.

Agnew, who now lives in Palm Springs, Calif., did not testify at this civil trial. Instead, his lawyer said that he would invoke his Fifth Amendment right against self-incrimination if called to the stand. This was noted today in the closing arguments made by Assistant Attorney General Michael Millemann, who recited all the testimony presented by the state and then concluded: "Against this uncontradicted evidence, we have Agnew's profound silence."

The state and the taxpayers had presented a case based heavily on the sworn statements of four former Agnew associates, who had become his chief accusers in the federal investigation of alleged kickbacks. Judge Williams found those statements -- given to federal prosecutors in 1973 -- "reliable" and "accurate," and turned aside the argument by Agnew's attorney that they were statements given by "desperate" men attempting to save themselves from prosecution.

The statements by wealthy developer and Agnew fund-raiser I. H. Hammerman II, Agnew's state roads commissioner Jerome Wolff and two engineers, Lester Matz and Allen Green, alleged that Agnew had taken payments in return for lucrative state contracts while he was governor and then vice president.

Williams said the statements showed the Agnew had taken part in an "unlawful relationship" with Hammerman and Wolff, receiving $60,000 in kickbacks collected by Hammerman. Engineer Green paid Agnew $50,000 directly and Matz paid $37,500 -- an amount that included envelopes of cash handed over in the vice president's White House office, Williams quoted the statements as showing.

"This case has been a sad one," Williams said in issuing his ruling. "Its substance represents an unfortunate time in the history of the state of Maryland."

Moments before issuing his order, Williams dismissed as plaintiffs the three taxpayers who originally filed the lawsuit on behalf of the state. He ruled that they lacked the legal basis for suing because they had not proven they had suffered "special damages" through the alleged scheme. William Dobrovir, their attorney, said he was "disappointed" by that ruling, but he said the taxpayers had gained their objective with the "ruling that Agnew is liable" and must repay the state.