It was the work of three law school students on a class project that forced former Vice President Spiro Agnew to pay back more than $268,000 in kickbacks and interest to the state of Maryland.

 The professor whose students won a civil suit against Agnew said Wednesday he hopes the same tactics will be used to fight government corruption elsewhere.
 ''I hope we have set an example which might be followed in other situations where there are corrupt officials and the government refuses to take action,'' said John Banzhaf III, a George Washington University Law School professor. Maryland Attorney General Stephen Sachs Tuesday turned over a check from Agnew for $268,482 to state Treasurer William James.

 After losing two appeals, Agnew complied with a 1981 court ruling that he violated his public trust as Maryland's governor by accepting kickbacks from highway contractors from 1967 to 1969. He said he would not seek Supreme Court review.

 Agnew never was convicted in criminal court. Instead, he resigned the vice presidency in October 1973. He pleaded no contest to a tax evasion charge, and indictments alleging conspiracy, bribery and extortion were not pressed.

 The repayment, which Sachs said ''helps erase at least part of the stain that Maryland's reputation suffered because of Mr. Agnew's greed,'' closes a suit filed by Banzhaf's students in 1976 as a project in his course on legal activism.

 The students pick their own projects, he said, and in most cases are at least partly successful.

 The students, known as ''Banzhaf's Bandits,'' chose the Agnew project when ''it looked like Agnew was going to step down as vice president and suffer virtually no penalties and get to keep all his money,'' Banzhaf said. They developed a legal theory under which the state could bring suit.

 ''But in meeting with (Gov.) Marvin Mandel and the attorney general at the time, we argued unsuccessfully with them for over an hour trying to convince them to bring suit,'' Banzhaf said. ''They were very evasive, which is understandable in hindsight.''

 Mandel later served a three-year prison term for mail fraud and racketeering in a scheme to influence race track legislation in return for about $300,000 in cash and gifts.

 The students found an old English precedent allowing an individual to bring suit when the government will not. They got four Maryland residents willing to let their names be used to file suit on behalf of the state.

 Banzhaf, 42, once practiced law in New York but left a firm there for teaching in Washington after filing a complaint that led to a requirement of equal broadcasting time for anti-smoking messages on broadcast outlets carrying cigarette advertising.

 He discovered after filing the complaint that the firm's chief client was a major cigarette manufacturer.