Although problems within the District's Youth Services Administration have festered for more than a year and sparked four investigations, Mayor Marion Barry waited until last week to shake up the agency and order audits and policy changes to deal with longstanding problems.

Barry's administration forced Patricia Quann, head of the agency, to resign Friday, and the mayor publicly criticized David Rivers, director of the D.C. Department of Human Services, who oversees the youth agency's activities.

One of the earliest warnings came 15 months ago, when the District was sued by the Public Defender Service for allegedly subjecting delinquent youths to beatings from their city counselors, inadequate medical care and vermin-infested housing that could not pass fire inspections.

Six months later, a report on a year-long investigation by the federal General Accounting Office was issued, showing that the District had failed to educate hundreds of learning-disabled or emotionally disturbed juveniles detained in its facilities.

The GAO report, part of a congressional hearing, prompted expanded investigations into the Youth Services Administration by the GAO, FBI, U.S. attorney's office and the agency's own internal auditors.

A month later, news reports detailed serious drug problems at the D.C. youth institutions. In April 1986, a federal grand jury began hearing testimony on massive abuses of overtime pay within the youth agency and its questionable contracts, subpoenaing at least 16 city employes.

Disclosure of the widespread abuse of overtime payments, which enabled select agency employes to double and triple their regular salaries, apparently was the turning point. City Administrator Thomas Downs intervened last week, demanding Quann's resignation. Quann resigned late Friday after taking part in an intense, two-hour meeting with other Department of Human Services officials, including Audrey Rowe, D.C. comissioner of social services and Quann's immediate superior.

Barry said in a statement that he found the abuses in overtime payments "incredible" and ordered Coopers & Lybrand, the city's outside auditors, to examine the agency's overtime payments.

Coopers & Lybrand played a similar role in a controversy at the University of the District of Columbia last summer. The university's board of directors, reacting to reports by D.C. Auditor Otis Troupe of misspending by then-President Robert L. Green, hired the firm to conduct a parallel investigation.

Barry instructed the firm to audit the Youth Services records of employes and supervisors that already have been examined by the GAO and FBI and have been presented by the U.S. attorney's office to a federal grand jury.

The mayor's action Friday marked the third time since December that Barry has disciplined city officials and sought to minimize political damage stemming from investigations of wrongdoing in his administration.

In each case, Barry has waited for weeks, sometimes months, before taking action against high-level administrators.

The U.S. attorney's office, laying out its fraud and obstruction-of-justice case against former Barry aide Ivanhoe Donaldson, disclosed in December evidence of widespread contract abuses within the D.C. Department of Employment Services. Barry waited until March to accept the resignations of Employment Services Director Matthew F. Shannon and Deputy Director James George and announce disciplinary action against eight other department officials.

Deputy Mayor for Finance Alphonse G. Hill resigned under fire March 15 following the disclosure that he accepted $3,000 in payments from a city auditing contractor. The move came five weeks after the first published reports that a federal grand jury was investigating whether the head of the auditing firm gave kickbacks or other financial incentives to Hill in return for city business.

Hill had other problems dating back nearly a year, when his supervision of the city's cash management system was criticized during hearings before a D.C. City Council committee. Hill was criticized for approving the investment of city cash with a securities firm that went bankrupt. One of Hill's subordinates, former D.C. Treasurer Fred Williams, acknowledged back-dating a memorandum justifying investment with the firm.

The mayor's latest action was prompted, he said, by findings in a report he asked Rivers of the human services department to prepare on overtime payments in the youth agency. His request came shortly after The Washington Post reported May 19 that the agency spent $6 million in overtime costs during the last three years at the city's three youth institutions.

Rivers' report found that 99 of the youth agency's 240 employes were paid 50 percent more than their salaries in overtime. One employe, who was scheduled to earn $19,734, was paid for 4,615 hours of overtime in one year, including 40 Sundays at time-and-a-half, 10 holidays at double-time, and $23,154 in straight overtime for total yearly earnings of $51,769. Federal investigators who have examined employes' pay records, many of which were partially obliterated with correction fluid, have found examples where workers signed in at two locations simultaneously, sources said.

In his strongly worded statement, Barry did not question Quann or Rowe, who had to shift $50,000 every two weeks to pay for the youth agency overtime, but lambasted Rivers for "a serious lapse in management controls." "In almost every area of the administration of the Department of Human Services you have done a good job," Barry told Rivers, "but I am deeply disappointed and have grave concerns about the problems of the Youth Services Administration."

Rivers' secretary said Friday he is on vacation and could not be reached for comment. Neither Downs nor a spokesman for Barry could be reached for comment yesterday.

In recent months, several problems have plagued Rivers' department, from questions about school drug abuse contracts to a probe of its spending on homeless shelters to a foster home fire where five children died in the care of a wanted felon who was drunk. Throughout these incidents, the mayor indicated he thought Rivers was a good administrator and continued to support him.

In his latest statement, however, Barry said, "The Department knew it had only $500,000 budgeted in overtime and should have requested additional funding and positions to meet this demand."

The employe chosen to direct the troubled youth agency temporarily, Robert Malson, has been a top aide to Rowe since 1983. Prior to joining the District government, he was an associate director of the domestic policy staff in the Carter White House. Malson, a Harvard University Law School graduate, also was counsel to the U.S. Senate Judiciary Committee from 1975 to 1977.