Opinion by
Mr. Justice Roberts,On July 30, 1969, the District Attorney of Philadelphia was served with a complaint in the case of Marvin Burak v. Commonwealth of Pennsylvania; City of Philadelphia; Frank Rizzo, Police Commissioner; and Arlen Specter, District Attorney. That suit was commenced in United States District Court for the Eastern District of Pennsylvania, the plaintiff requesting that certain penal statutes of the Commonwealth, under which he was to he prosecuted in Philadelphia, be declared unconstitutional. On July 31, at a hearing in federal court to determine whether a three-judge court should be convened, a Deputy City Solicitor of Philadelphia and an Assistant District Attorney of Philadelphia entered appearances on behalf of the District Attorney. Each attorney made motions to strike the other’s appearance. The City Solicitor’s office was of the view that it was the only proper representative of the District Attorney’s office; the District Attorney’s office was of the view that it must represent itself in the litigation. After taking the matter under advisement, the district court dismissed both motions.
Following this, the District Attorney initiated equitable proceedings in the Court of Common Pleas of Philadelphia County, seeking to enjoin the City Solicitor from representing him in the federal court litigation.1 Preliminary objections were filed, alleging, in*40ter alia, that tbe City Solicitor’s office, under the Philadelphia Home Rule Charter, had the duty to represent the District Attorney in the federal litigation. This objection was sustained2 and the complaint was dismissed. We reverse.
This is not the first time we have been asked to consider what effect Philadelphia’s Home Rule Charter has on the office of the District Attorney. See Chalfin v. Specter, 426 Pa. 464, 233 A. 2d 562 (1967); Commonwealth ex rel. Specter v. Martin, 426 Pa. 102, 232 A. 2d 729 (1967); Commonwealth ex rel. Specter v. Freed, 424 Pa. 508, 228 A. 2d 382 (1967). While this problem may not have proved easy to resolve in other contexts, it is easy here, for we are today faced with a direct challenge to the District Attorney’s basic function—enforcement of the Commonwealth’s penal statutes.
Prior to 1850, investigation and prosecution of criminal offenses in Pennsylvania were exclusively the duty of the Attorney General of the Commonwealth, although in practice he delegated this duty by appointing deputy attorneys general for the several counties. See Com*41monwealth ex rel. Specter v. Freed,, 424 Pa. at 512, 228 A. 2d at 383-84. In 1850 the General Assembly enacted legislation which provided for the election of these deputy attorneys general. The successor to that statute presently provides, in relevant part, that “[t]he district attorney shall . . . conduct in court all criminal and other prosecutions, in the name of the Commonwealth . . . and perform all the duties which, prior to May 3, 1850, were performed by deputy attorneys general.” Act of July:5, 1957, P. L. 484, §1, 16 P.S. §1402(a) (Supp. 1969). If this statute means anything at all, it means that district attorneys in this Commonwealth have the power—and the duty—to represent the Commonwealth’s interests in the enforcement of its criminal laws.
Clearly encompassed within this law enforcement responsibility is a district attorney’s duty to counter, in the course of prosecution, a defense that a state penal statute is unconstitutional. Surely the City Solicitor would not contend that he must represent the District Attorney when an individual who has suffered a criminal conviction brings a suit challenging the constitutionality of the statute under which he was convicted. Such suits occur all the time in the federal forum—they are called habeas corpus actions. In those proceedings in the federal judicial system, the District Attorney is engaged in preserving the integrity of the conviction and sentence imposed by the state trial court and affirmed by the state appellate courts. In this case in the federal system, the District Attorney is similarly seeking to preserve the Commonwealth’s criminal process by defending a litigant’s attack on the constitutionality of the state statutes under which he is to be prosecuted. How, then, can the City Solicitor assert his right to represent the District Attorney in the federal case here? The fact that a potential defendant may raise his defense of unconstitutionality *42before the criminal proceeding is initiated, rather than during or after the course of prosecution, see Dombrowski v. Pfister, 380 U.S. 479, 85 S. Ct. 1116 (1965), does not alter the character of the district attorney’s functions and responsibilities. The district attorney is still engaged in upholding the validity of the criminal statutes of the Commonwealth, and in prosecuting those who violate its criminal laws.
Yet the City Solicitor urges that Philadelphia’s Home Rule Charter has changed the District Attorney’s historical duties and statutory powers. We are asked to hold that the City Solicitor of Philadelphia is required by Philadelphia’s Home Rule Charter to represent the District Attorney in a suit wherein a litigant seeks to enjoin the state, and hence the District Attorney, from prosecuting him under allegedly unconstitutional state statutes. But we need not reach the question of whether Philadelphia’s Home Rule Charter does in fact mandate such a result, because we are of the opinion that it could not do so.
The Act of April 21, 1949, P. L. 665, §18, 53 P.S. §13133(b), provides: “notwithstanding the grant of powers contained in this act [enabling cities to pass Home Rule Charters], no city shall exercise powers contrary to, or in limitation or enlargement of, powers granted by acts of the General Assembly which are... (b) Applicable in every part of the Commonwealth.” The District Attorney, in the federal suit, was called upon to defend the Commonwealth’s penal statutes against an attack of unconstitutionality. He has the power to do so pursuant to the Act of July 5, 1957, supra, an act applicable in every part of the Commonwealth. Thus, under the enabling act, Philadelphia could not limit or interfere with the District Attorney in the exercise of this power. See Commonwealth ex rel. Specter v. Freed, 424 Pa. at 521-22, 228 A. 2d at 387 (concurring opinion).
*43We therefore hold that the Philadelphia City Solicitor cannot interfere with the Philadelphia District Attorney when the District Attorney is engaged, pursuant to his statutory power, in fulfilling his historical duty of representing the Commonwealth’s interests in the enforcement of its criminal laws. The City Solicitor, a locally appointed official, may not be permitted to infringe upon the District Attorney’s powers or functions in the prosecution of the criminal law. The District Attorney of Philadelphia County, no less than district attorneys in any other county of this Commonwealth, is the sole public official charged with the legal responsibility of conducting “in court all criminal and other prosecutions, in the name of the Commonwealth.” Act of July 5,1957, supra. The District Attorney must be allowed to carry out this important function without hindrance or interference from any source.
Since the chancellor improperly sustained the City Solicitor’s preliminary objections, the decree must be vacated and the case remanded for further proceedings consistent with this opinion.
The City Solicitor subsequently commenced a federal suit, seeking to enjoin tbe instant suit in tbe state system. The federal court has not as yet ruled on the matter.
The City Solicitor also urged the dismissal of the suit on the grounds that the court was without jurisdiction to consider the question of representation in a federal court, and that the case was improperly captioned. Both objections are devoid of any merit, and were properly dismissed by the chancellor. As to jurisdiction, the District Attorney is not seeking to enjoin the City Solicitor from making any appearance in this federal litigation; he is only seeking to restrain the City Solicitor from representing the District Attorney in the litigation. The federal court, or any court, may decide for itself whether to hear extraneous persons. But the determination of whether, under state law, the City Solicitor or the District Attorney is the proper person to represent the District Attorney is one which the state court can quite properly make. As to captioning, even assuming the City Solicitor’s contention is correct, such a trivial detail, easily correctable by amendment, hardly constitutes a reason to dismiss a complaint outright.