WASHINGTON (AP) _ Former Deputy Mayor Alphonse Hill, largely credited with designing the District of Columbia's financial system, pleaded guilty Friday to conspiring to defraud the city and tax evasion.

Meanwhile, prosecutors disclosed a 17-month FBI undercover investigation into alleged district government corruption.

In agreeing to a plea bargain that wipes out nine more serious counts, Hill becomes the second of Mayor Marion Barry Jr.'s top aides to admit to using public office for personal gain.

Prosecutors agreed that in exchange for Hill's guilty plea on one count each of tax evasion and conspiracy to defraud the city, they would drop other charges that Hill extorted $44,000 from city contractors and committed fraud during his seven-year tenure running the district's finances.

U.S. Attorney Joseph diGenova refused, through a spokesman, to comment on whether the FBI's investigation into alleged corruption in city contracting was tied to the Hill case.

''The investigation has focused on allegations of fraud regarding the administration of both federal and local contracts in the District of Columbia,'' diGenova said.

DiGenova said the FBI's undercover activities had ended, but he described the investigation as continuing. No arrests had been made in the investigation as of late Friday night.

Hill, 48, was city controller from 1979 until 1983 and was deputy mayor for finance and development until March 1986, when he resigned under fire.

He faces a maximum five years in prison and $10,000 in fines on each of the charges when he is sentenced June 23. An 11-count indictment returned earlier this year included charges with penalties ranging up to 115 years and $380,000 in fines.

Hill told U.S. District Judge William Bryant that he helped a Chicago accounting firm run by a long-time friend and former college roommate, James Hill gain auditing contracts under the district's ''set-aside'' program for minority businesses. Alphonse Hill and James Hill are not related.

In exchange, prosecutors said, James Hill would ''take care of him'' once Alphonse Hill left public service.

Alphonse Hill also admitted that he did not list $2,300 in income he earned in 1981 for work he did outside his city job.

Another former deputy mayor, Ivanhoe Donaldson, pleaded guilty in 1985 to defrauding the city government of more than $190,000 and is in federal prison in Petersburg, Va.