Attorney General Benjamin R. Civiletti and D.C. Mayor Marion Barry led a parade of witnesses yesterday who testified in favor of legislation which would give the city government authority over the local criminal justice system.

The bill, drafted by District and federal officials, would give city judges a 10 percent salary increase and transfer to the city responsibility for most criminal cases that are now handled by federal prosecutors, as well as responsibility for security at the local courthouse here.

The legislation also would create a District of Columbia attorney general's office and give the mayor authority to appoint the city's judges, but it is not expected to be acted upon before Congress adjourns for its campaign recess next month.

Although the bill has won support from elected city officials and the Carter administration, it is opposed by some of the city's judges, who have said that transferring the power to appoint judges to the mayor may harm the quality of the Superior Court bench if candidates are no longer scrutinized by the White House, as they are now.

Civiletti left open the possibility that there might be further negotiations on whether the District's attorney general would be appointed or elected, but he expressed some reservations on appointing such officials. The bill provides for an appointed attorney general, although Barry said that eventually he might favor having District voters elect their top prosecutor, as is the case in 43 states.

Virtually all of the witnesses before the District Committee's judiciary, manpower and education subcommittee echoed sentiments that the bill was in the spirit of home rule and court reorganization.

Transferring prosecutorial authority from the federal government "to a locally appointed official should increase not only the actual responsiveness of the prosecutor to community concerns," said Civiletti, "but also the community's sense that its interests are being served by its princiapl law enforcement authority."

According to estimates by the mayor's office, the creation of a local prosecutor's office would cost approximately $35 million to $40 million during the first four years. Currently, it costs about $14 million to run the U.S. attorney's office and federal marshals service for Superior Court. If the city takes over the operation, the federal government's share of the cost would decreasea on a prearranged basis over the four years.

Some of the committee members asked city officials whether the District could afford to take on an agency with such a large budget.

"Freedom always has a price," said City Council Chairman Arrington Dixon, "and we will have to be willing to pay that." Barry also said that the city would make budget sacrifices in order to ensure proper funding of the new prosecutor's office because the city felt "so stronly about it."

The bill also includes a proposed salary increase for D.C. Superior Court judges which would raise their annual $49,050 salaries to $54,500, the salary paid to federal trial judges.

D.C. Court of Appeals Chief Judge Theodore R. Newman Jr. testified that whilehe felt judges needed the salary increase, he considered it a seperate issue from the transfer of authority over the city's criminal justice system. Some opponents of the measure have said that the pay increases could be an effort to defuse judicial criticism of the plan.

Other aspects of the proposed legislation which may prove controverisal include a provision allowing a sharing of grand jury records between federal and local prosecutors, which subcommittee chairman Rep. Romano L. Mazzoli (D-Ky.) said is being opposed by the American Civil Liberties Union.

Another possibly controversial procedure would allow the U.S. attorney general to prosecute a District of Columbia case in which he felt there was a sufficient "federal interst." Such action would not be reviewable by a judge.

Mazzoli said after the hearing that new legislation on the proposal transfer of authority would probably be introduced during the next session of Congress. If passed, the bill might then take effect in 1982.

U.S. Attorney Charles F. C. Ruff said that if the legislation is approved, current assistant U.S. attorneys could continue to assist local prosecutors on existing cases during the period in which authority is transferred from the federal government to the local attorney general's office.