Sen. Alfonse M. D'Amato, the conservative New York Republican who proved an unexpected friend to the D.C. government as head of the subcommittee that controls the city's purse strings, said this week he is leaving the post because he felt he was elected to be something other than the "full-time overseer" of the District of Columbia.

"After a while, it becomes like your own committee," D'Amato said, in explaining why he relinquished control of the D.C. appropriations subcommittee to take a new assignment. "And I think it's so important that it [the action of the subcommittee] not be considered D'Amato's views."

Mayor Marion Barry and his top aides were stunned last week at D'Amato's decision, just as they had winced two years ago when he took over the subcommittee. City officials had feared that the feisty conservative from Long Island, who had unseated liberal Sen. Jacob Javits and who held strong law-and-order and antiabortion views, would have little sympathy for the financial and social problems of a large, mostly black city.

But D'Amato and his subcommittee eventually proved more supportive of the city on budget and home rule issues than the counterpart House subcommittee, which is chaired by liberal Democrat Julian Dixon of California.

"I've been the defender of home rule," D'Amato said. "I've spent a lot of time trying to get Congress not to nit-pick everything the District does."

City officials agree with D'Amato's assessment. "On the Senate side, we've had a lot of chairmen and often we've not been sure how the committee would behave," said D.C. Budget Director Gladys W. Mack. "Sen. D'Amato was among those who were especially helpful to us."

D'Amato's replacement, Sen. Arlen Specter (R-Pa.), a former Philadelphia district attorney and assistant counsel to the Warren Commission, says he doesn't intend to depart significantly from the course set by D'Amato.

"I believe in the principles of home rule and that the city should control its own affairs," he said recently. "On the funding aspect, the Congress has a very important role . . . . If you're going to appropriate money, you have to know where it's being spent and if it's being spent appropriately."

Specter, 52, said he is well-suited for his new assignment because he understands big-city problems and has a keen interest in Washington. That interest is born in part, he said, of having purchased a condominium in Georgetown with his wife, Joan, a Republican member of the Philadelphia City Council who commutes back and forth to Washington.

"One difference I might have from Sen. D'Amato is more familiarity with the problems of the big city," Specter said. "Al comes from Long Island and was a township supervisor . . . . I was DA of Philadelphia and a candidate for mayor, and came within an eyelash of being elected mayor in Philadelphia back in 1967."

Specter, a graduate of the University of Pennsylvania and Yale law school, served two terms as Philadelphia's district attorney, between 1966 and 1974. Later, he lost bids for the Republican nomination for the U.S. Senate (1976) and governor (1978) before winning a Senate seat in 1980.

When D'Amato decided to leave the D.C. panel last week to become chairman of the legislative branch subcommittee of the Appropriations Committee, Specter, who had served under D'Amato on the subcommittee, had seniority enough to assume control.

Specter praised Barry and the police department for doing a reasonably good job of dealing with crime, "given their limited resources and the nature of the crime problem."

He said he would push for finding ways to detect and treat juvenile offenders before they get into more serious trouble. He said he also favored programs to reduce recidivism by adult offenders and speed up the process of bringing defendants to trial.

"I think the courts are the critical spot and then beyond the courts the correctional system," he said.

Specter also said he intends to pay close attention to local development issues.

"Being a resident here, I'd be interested to know what's going to happen to Georgetown," he said. "I'm concerned about the absence of a subway that goes there. I'm concerned about the riverfront and what will happen to the Whitehurst expressway there that may be lowered or may be eliminated."

Despite city officials' fears about D'Amato when he took over the subcommittee two years ago, within a week he and the mayor were toasting each other with New York state champagne and Barry was telling reporters he was getting "good vibrations" from the freshman senator.

D'Amato sided with Barry last year after the mayor was criticized by D.C. Board of Education members for not approving more money for public schools. When antiabortion groups demanded that no city funds be used to pay for abortions for indigent women, D'Amato astonished them by saying that it was up to city officials to make that decision.

D'Amato was instrumental in winning support for a record $361 million federal payment for the District this year, plus an additional $3.1 million to hire more prosecutors in D.C. Superior Court and to buy equipment for the police department.

In return, the city went along with many of D'Amato's requests. For instance, when the senator complained last summer that there were too many criminals at large in the city, the D.C. City Council passed emergency legislation to make it easier for prosectors to keep offenders who repeatedly commit violent crimes in jail until their trials.

D'Amato said this week the city "has come a long ways" toward improving its cash-management system, even though the city finished the last fiscal year with a $68-million surplus after officials had warned of the possibility of a major deficit. "I think it's far better to have an unexpected large surplus than an unexpected large deficit," D'Amato said.

However, D'Amato sharply criticized the city's computerized Financial Management System, a costly and complicated system that Congress imposed on the city and that D'Amato says operates at only half of its capacity.

"One of the greatest disgraces was Congress spending tens of millions of dollars on a system that still doesn't work," D'Amato said. "I'm glad that I came in at the end of that fiasco."

Ironically, D'Amato and city officials parted company two weeks ago over a major home rule issue when D'Amato favored restrictions that would prohibit the new D.C. Convention Center from competing with the Capital Centre in Landover and other facilities for professional sporting events and concerts. Other senators, led by Sen. Thomas Eagleton (D-Mo.), managed to get the measure defeated, 54-40.