
156 N.J. Super. 137 (1978)
383 A.2d 714
TOWNSHIP OF EDISON ET AL., PLAINTIFFS-RESPONDENTS,
v.
WILLIAM F. HYLAND, ETC., DEFENDANT-RESPONDENT, AND BOARD OF CHOSEN FREEHOLDERS OF THE COUNTY OF MIDDLESEX, DEFENDANT-APPELLANT.
TOWNSHIP OF WOODBRIDGE ET AL., PLAINTIFFS-RESPONDENTS,
v.
WILLIAM F. HYLAND, ETC., DEFENDANT-RESPONDENT, AND BOARD OF CHOSEN FREEHOLDERS OF THE COUNTY OF MIDDLESEX, DEFENDANT-APPELLANT.
JOHN DELIMAN, PLAINTIFF-RESPONDENT,
v.
WILLIAM F. HYLAND, ETC., DEFENDANT-RESPONDENT, AND BOARD OF CHOSEN FREEHOLDERS OF THE COUNTY OF MIDDLESEX, DEFENDANT-APPELLANT.
Superior Court of New Jersey, Appellate Division.
Argued January 4, 1978.
Decided February 2, 1978.
*138 Before Judges HALPERN, LARNER and KING.
Mr. Louis J. Alfonso, Assistant County Counsel of the County of Middlesex, argued the cause for defendant-appellant Middlesex County Board of Chosen Freeholders.
Mr. Raymond Gill argued the cause for plaintiffs-respondents Dominick Cavallero and Township of Woodbridge (Mr. Robert F. Dato, attorney).
Mr. Joseph J. Benedict argued the cause for plaintiff-respondent John Deliman (Messrs. Benedict and Orban, attorneys).
Ms. Erminie L. Conley, Deputy Attorney General, argued the cause for defendant-respondent William F. Hyland, Attorney *139 General (Mr. Stephen Skillman, Assistant Attorney General, of counsel).
No brief or appearance for Township of Edison and Garrett Voorhees.
The opinion of the court was delivered by LARNER, J.A.D.
The issues herein arise in three consolidated appeals from judgments declaring that the Board of Chosen Freeholders of Middlesex County is responsible for the cost of defense of a civil rights suit instituted against two municipal police officers and a prosecutor's detective in the United States District Court for the District of New Jersey.
Garrett Voorhees is a detective on the police force of the Township of Edison. Dominick Cavallero holds a similar position on the police force of the Township of Woodbridge. John Deliman is a prosecutor's detective attached to the Middlesex County Prosecutor's office.
On February 3, 1972, at the request of the Middlesex County Prosecutor, the board of freeholders adopted a resolution approving and authorizing the formation of a task force to combat narcotics-related offenses, in which it exhorted county officials and all municipalities in the county to cooperate with the prosecutor in the formation of the task force and its endeavors.
Subsequently a number of municipalities, including Edison and Woodbridge, adopted resolutions in which they acknowledged their desire to cooperate and participate with the county prosecutor in their mutual effort through the manning and work of the task force. By way of implementation of their participation the resolutions of these municipalities provided that one or more members of the police department shall be designated by the police chief or director to become a "member of and participant" in the task force, and that each of these designees, in addition to his regular duties, shall "apply his professional time and effort to *140 enforcement of the narcotics laws in his own municipality and on assignment in other municipalities within the County. * * *"
Additionally, the resolutions stated that "the Township * * * shall be responsible for the full pay, allowance and benefits of the designated police officer while the latter is assigned to the Middlesex County Narcotics Task Force."
John Deliman, the detective employed in the prosecutor's office, was assigned by the prosecutor to take charge of the task force and supervise its activities.
As part of its duties, the task force, including the three members named above, was engaged in an investigation centered on alleged illegal activities of one Stephen Cavano. As a consequence of this investigation Cavano instituted an action against the police officers involved in this litigation, in which he sought damages for violation of his civil rights stemming from the actions of defendants in their official investigation. Concededly this civil proceeding arises out of the performance of the duties of those members of the task force who are the parties herein.
Suits were instituted by both municipalities and their police officers seeking a judgment declaring that the cost of defense of the federal court case should be undertaken either by the county and/or the State of New Jersey. The county detective Deliman also filed a complaint seeking similar relief against the county and/or the State.
The cases were heard at different times, resulting in judgments declaring that the Board of Freeholders of Middlesex County is obligated to provide for the defense of all the individual plaintiffs.[1] The county appeals from that determination.


*141 Voorhees and Cavallero

N.J.S.A. 40A:14-155 creates the duty on the part of a municipality to provide the necessary means for the defense of any legal action against a police officer "arising out of or incidental to the performance of his duties." Since the federal court suit admittedly arises out of the performance of the duties of Voorhees and Cavallero, the narrow question is whether their performance as members of the county task force justifies a shifting of the burden of such defense from the municipality to the county or the State.
The trial judge eliminated the State as the entity responsible for the cost of defense of the municipal police officers. This conclusion was based upon the reasoning that the obligation of the State to provide a defense is limited to those who are truly state employees. See N.J.S.A. 59:10A-1 et seq.
We agree with this determination. Although a prosecutor and prosecutor's detectives may be considered as agents of the State for some purposes (Cashen v. Spann, 66 N.J. 541, 552 (1975)), they are not employees of the State for certain administrative and remunerative purposes, for the financial burdens of the prosecutor's office are imposed on the county. See Dunne v. Firemen's Fund Am. Ins. Co., 69 N.J. 244, 248-251 (1976). It follows all the more that municipal employees hired and paid by the municipalities and assigned to the prosecutor for the performance of a special investigative function cannot be considered state employees within the ambit of N.J.S.A. 59:10A-1 et seq.
We next turn to the question of the propriety of the trial court's order that the county is responsible for providing a defense for the municipal police officers. This order followed from the court's interpretation of the general statutory mandate which requires the county to pay "all necessary *142 expenses incurred by the prosecutor for each county in the detection, arrest, indictment and conviction of offenders against the laws." N.J.S.A. 2A:158-7. Cf. State v. Rush, 46 N.J. 399 (1966). Other than this broad statute imposing fiscal responsibility on the county to pay for all the expenses of operation of the prosecutor's office necessary for detection, arrest, indictment and conviction of offenders, there is no statute paralleling N.J.S.A. 40A:14-155 which mandates that counties are responsible for the defense of employees engaged in prosecutorial work.[2]
From the statutory pattern which we have outlined we find no legislative provision which calls upon the county to provide for the defense of the municipal police officers functioning as members of the prosecutor's task force. The financing of a defense in a civil action against a police officer, albeit arising out of his official duties on the task force, is a far cry from the mandatory financing of the prosecutor's office in its function of detection and prosecution of criminal offenders. The latter is directly related to the prosecution of the criminal business of the county. The former relates to a collateral burden pertaining to a civil action for damages between an allegedly aggrieved party and an individual member of the task force. In our opinion the cited statute has no applicability to the issue herein.
Furthermore, in the absence of a legislative provision, there is no valid basis in law for compelling the county to undertake the defense of the municipal police officers. Both the trial judge and counsel for respondents Cavallero and *143 Woodbridge take the position that the county's duty to provide a legal defense arises also out of doctrines of vicarious liability on the thesis that the police officers were borrowed employees under the control of the prosecutor. Therefore, they argue that the county should be held responsible for the defense costs in the civil litigation.
This argument is misplaced. We are not dealing in this case with a question of vicarious liability to a claimant of the State, county or municipality for the tortious acts of the individual police officers, in which event the factual and legal problems relating to borrowed employees and control might come into play. We are rather concerned with the narrow issue of responsibility for the defense of the civil action in which legislative provisions and the controlling agreements are of paramount significance. Doctrines of vicarious liability have no place in the determination of the particular issue involved in this appeal.
Having eliminated the State and the county from liability for the defense of the municipal police officers, we hold that the only entities legally responsible for their defense costs are their respective employers, the Townships of Edison and Woodbridge.
As we have already noted, N.J.S.A. 40A:14-155 creates this liability. Under the resolutions adopted by both municipalities it was acknowledged that local police participation on the prosecutor's task force was beneficial to the welfare and safety of the residents of the municipalities as part of the County of Middlesex. The mutual assistance and cooperation of the local entities in assigning their police officers was simply another method of carrying out their local police functions.
Regardless of the particular assignment of Voorhees and Cavallero, their efforts were directly associated with their police function as officers of each municipality. As such they remained as employees of the municipalities and their duties continued to be performed for those municipalities *144 within the purpose and intent of the benefits accorded by N.J.S.A. 40A:14-155. Their subjection to the supervision and direction of the county prosecutor does not change this result in any degree.
Other provisions of the resolutions lend greater support for this conclusion. They provide that the assigned police officer shall "in addition to his regularly assigned duties, apply his professional time and effort to enforcement of the narcotics laws in his own municipality and on assignment in other municipalities within the county." Secondly, they state explicitly: "[T]he Township * * * shall be responsible for the full pay, allowance and benefits of the designated police officer while the latter is assigned to the Middlesex County Narcotics Task Force."
By the foregoing each municipality officially acknowledges its continued obligation to maintain the responsibility for all salaries and benefits of the police officers despite the nature of their particular assignment. And since the right to a defense is a benefit mandated by the Legislature, each municipality undertook by its resolution to furnish that benefit throughout the assignment.

John Deliman
What we have said as to the State's lack of responsibility for the defense of Voorhees and Cavallero is equally applicable to the claim of county detective John Deliman. Repetition would be superfluous. The trial judge's determination in that respect is correct.
At oral argument counsel for the County of Middlesex stipulated that if the position of the State with respect to this county employee is sustained, the county would voluntarily accept the responsibility in accordance with the determination below. We therefore do not undertake to render an opinion as to the existence or nonexistence of a compulsory obligation of the county to provide a defense for Deliman.
*145 Judgment is affirmed as to Deliman. We reverse the judgment as to the county's obligation to provide a defense for Voorhees and Cavallero, with the direction that judgment be entered declaring that the Township of Edison must furnish a defense for Voorhees and the Township of Woodbridge for Cavallero.
No costs to any party.
NOTES
[1]  The trial judge expressly declined to adjudicate at this stage whether the public entity will be required to indemnify plaintiffs in the event of an adverse judgment in the federal action. Similarly, our opinion is limited to the issue of the cost of defense and not intended to constitute a ruling on the question of indemnification for any money judgment which may be entered in the federal court litigation. That issue is dependent upon other factual and legal criteria.
[2]  The only analogous statute is N.J.S.A. 40A:14-117, which provides for such legal defense for "a member or officer of a county police department or force." We find this statute inapplicable to detectives or investigators attached or subject to the control of the county prosectuor. The county police function is limited to traffic violations (N.J.S.A. 40A:14-106) and is entirely separate from the function of county detectives who are part of the prosecutor's staff. See N.J.S.A. 2A:157-1 et seq.
