Greg McClure, who said repeatedly that all he wanted to do was go back to work as a D.C. police officer, got his job back last week after three years of battling with the police department.

McClure, 37, who was named the 3rd District police officer of the year in 1982, spent the past three years defending himself against police department charges and working for a reduced annual income, first as a car salesman, then as a hotel desk clerk.

In October 1984, while off duty and visiting in Baltimore, he was charged with committing a sex offense with a former prostitute. McClure insisted on his innocence, and the criminal case was dropped two months later. But the police department pursued the matter and a police trial board found him guilty of conduct prejudicial to the reputation and good order of the force.

The board recommended a 90-day suspension and transfer from the 3rd District, but a deputy chief decided that McClure should be fired.

McClure appealed, and 10 months ago a panel of the city's employe appeals board exonorated him and ordered reinstatement with full back pay. The police department appealed the decision to the full board, and last month the board also ruled in McClure's favor.

McClure's lawyer, J. Thomas Burch Jr., said he was told initially that the department would take the unusual step of appealing the case yet again, this time to D.C. Superior Court.

But Police Chief Maurice Turner Jr. signed an agreement with McClure on the last day remaining for the department to appeal the case.

McClure said the agreement gives him three years of back pay plus his old assignment as vice officer in the 3rd District. The department will pay one-third of his $15,000 in legal fees.

McClure, who at one point lacked money to make his mortgage payments and came close to losing his house, said he is glad to be back at work but is unhappy at the department's refusal to pay all of his attorney's fees.

Spokeswoman Shannon Cockett said the department would not comment on McClure's case. Gary Hankins, the labor representative for the Fraternal Order of Police, said it is the usual practice of the department to pay an officer's back salary and also his legal bills when the officer is exonerated of departmental charges.

Burch said he encouraged McClure to accept the compromise settlement rather than endure more waiting for the case to be heard in Superior Court.

McClure said: "I guess I am too much of an idealist. They admit I did nothing wrong, but they want to take money out of my pocket. I'm not pleased with the mistreatment I have seen and I know it won't end. But I am a cop at heart. It is what I do best. I am glad to be back."