OPINION OF THE COURT
Staley, Jr., J.In this action for a declaratory judgment, 51 County Sheriffs seek to enjoin the enforcement of Parts 7004, 7008, 7023, 7024, 7025 and 7026 of the regulations of the New York State Commission of Correction which concern prisoner correspondence, visitation, access to media, religion, packages, and printed material and publications. These regulations, adopted pursuant to subdivision 6 of section 45 of the Correction Law, were filed June 26, 1976, effective October 1, 1976, and the text of the regulations is set forth in title 9 of the Official Compilation of Codes, Rules and Regulations of the State of New York.
The complaint alleges that the duty to maintain and control the county jail and the inmates confined therein is vested in the Sheriff by section 13 of article XIII of the New York State Constitution, and by section 500-c of the Correction Law and section 217 of the County Law, and that, therefore, the commission’s rules and regulations are unconstitutional in that they transfer that duty from a constitutional office and an elected local officer to nonlocal, appointed officers.
It is further alleged that subdivision 6 of section 45 of the Correction Law, which authorized the Commission of Correction to "[promulgate rules and regulations establishing minimum standards for the care, custody, correction, treatment, supervision, discipline, and other correctional programs for all persons confined in correctional facilities”, delegates legislative authority to the commission without setting adequate and sufficient criteria and/or guidelines for such action, and that the rules and regulations promulgated pursuant to such authority are, therefore, void. It is also alleged that the rules *686and regulations are arbitrary, capricious, unreasonable, vague, indefinite and imprecise for various stated reasons, and that the rules and regulations are not minimum standards but, rather, detailed, extensive and comprehensive instructions and directives pertaining to every day administration of county jails which are void because the commission has acted in excess of its authority under subdivision 6 of section 45 of the Correction Law.
It is finally alleged that the commission, in promulgating the rules and regulations, did not comply with section 205 of the State Administrative Procedure Act, making the rules and regulations invalid.
Plaintiffs moved for a preliminary injunction enjoining the defendants from enforcing the rules and regulations, and defendants moved to dismiss the complaint for failure to state a cause of action. Special Term granted plaintiffs’ motion as to the rules and regulations pertaining to contact visitation, religion and access to media, and granted defendants’ motion with respect to the remaining rules and regulations challenged.
Section 13 of article XIII of the New York State Constitution clearly declares Sheriffs to be local constitutional officers, but it does not define their powers, ^duties or functions, nor place them in control of county jails. Section 650 of the County Law provides that the "sheriff shall perform the duties prescribed by law as an officer of the court and conservator of the peace within the county. He shall perform such additional and related duties as may be prescribed by law and directed by the board of supervisors.”
Local governments are authorized to contract indebtedness for the maintenance of correctional facilities by section 1 of article VIII of the New York State Constitution, and section 217 of the County Law requires each county to "continue to maintain a county jail as prescribed by law.”
Section 500-c of the Correction Law provides that: "[e]ach sheriff * * * shall have custody of the county jails and shall receive and safely keep, in the county jail of his county, every person lawfully committed to his custody for safekeeping, examination or trial * * * imprisonment therein, or committed for contempt * * * All persons confined in a county jail or penitentiary shall, as far as practicable, be kept separate from each other, and shall be allowed to converse with their counsel, or religious adviser, under such reasonable regulations *687and restrictions as the keeper of the jail may fix. Convicts under sentence shall not be allowed to converse with any other person, except in the presence of a keeper. The keeper may prevent all other conversations by any other prisoner in the jail when he shall deem it necessary and proper.”
Section 500-d of the Correction Law provides for food and labor, and authorizes the purchase by prisoners detained for trial of any other proper articles of food.
Section 500-e requires the keeper to provide a bible in each room of the jail, and to cause divine service to be conducted for the benefit of the prisoners at least once each Sunday if there be a room that may safely be used for the purpose. This section also directs the keeper to permit the prisoners to be supplied with suitable and proper books and papers.
Section 500-j of the Correction Law provides: "The following persons may visit at pleasure all county jails and workhouses: the governor and lieutenant-governor * * * district attorneys and every minister of the gospel having charge of a congregation in the town in which such jail or workhouse is located. No other person not otherwise authorized by law shall be permitted to enter the rooms of a county jail or workhouse in which convicts are confined, unless under such regulations as the sheriff of the county, or in counties within the city of New York, the commissioner of correction of such city, or in the county of Westchester, the commission of correction of such county, shall prescribe.”
Section 13 of article XIII of the New York State Constitution confers no right, duty or authority upon Sheriffs to maintain, operate and control county jails. The function of maintaining county jails was imposed upon each county by the Legislature pursuant to section 217 of the County Law, and custody and control of the county jails was conferred upon the Sheriffs by section 500-c of the Correction Law. The Legislature, having conferred these powers and duties, has the power to limit, curtail or abolish them with or without the consent of the counties or the Sheriffs (Matter of County of Cayuga v McHugh, 4 NY2d 609).
The Legislature may constitutionally grant rule-making power to the discretion of others, provided it limits the field in which they are to operate and provides standards to govern its exercise. The Legislature need not provide a precise and specific formula so long as it provides standards and guides in a broad outline leaving to administrative officials the duty of *688arranging the details (Matter of Levine v Whalen, 39 NY2d 510).
The standards set forth in subdivision 6 of section 45 of the Correction Law are not so vauge, indefinite or imprecise as to render them invalid. There is no doubt that the rule-making power conferred upon the Sheriffs as jail keeper by section 500-c of the Correction Law is curtailed or diminished by subdivision 6 of section 45. This, however, is within the power of the Legislature. The Legislature conferred upon defendants the power to establish "minimum” standards and inherent in such delegation of power is the requirement that such standards be reasonable and not arbitrary or capricious in view of the subject matter to be regulated.
The plaintiffs in their complaint have, however, alleged facts which, if proven, establish that the regulations adopted by the defendants create grave security risks, financial hardships, health and fire hazards. Administrative agencies can only promulgate rules to further the implementation of the law as it exists, and they have no authority to create a rule out of harmony with the statute or statutes being implemented (Matter of Jones v Berman, 37 NY2d 42). Under the allegations of the complaint, it is possible that the plaintiffs may establish facts indicating that certain parts of the regulations conflict with their statutory duty of safekeeping of prisoners confined to their custody. It, therefore, appears that the complaint is sufficient to survive a motion to dismiss.
In order to become entitled to a preliminary injunction, plaintiffs must establish a prima facie right to relief, that irreparable injury will occur without a preliminary injunction, and that the balance of the equities is in plaintiffs’ favor (Albina v Solork Assoc., 37 AD2d 835).
The plaintiffs have established a reasonable probability of success in this action, and the security and financial implications indicate the probability of irreparable injury. As to the equities, it does not appear that the granting of a preliminary injunction will adversely affect the defendants.
The allegations of the complaint and plaintiffs’ affidavits allege specific security and financial hardships as to the regulations affecting contact visits. The preliminary injunction should, therefore, be extended to all those regulations.
The order of Special Term should, therefore, be modified, so as to grant a preliminary injunction enjoining the enforcement of Part 7004 (correspondence), Part 7025 (packages) and *689Part 7026 (printed material and publications) of title 9. The preliminary injunction should, therefore, be extended to these regulations.
The order should be modified, on the law and the facts, by reversing so much thereof as dismissed the complaint for failure to state a cause of action with respect to Parts 7004, 7025 and 7026 of title 9 of the Official Compilation of Codes, Rules and Regulations, and by granting a preliminary injunction enjoining the enforcement of Parts 7004, 7025 and 7026 of title 9 of the Official Compilation of Codes, Rules and Regulations, and, as so modified, affirmed, without costs.
Mahoney, P. J., Sweeney, Larkin and Herlihy, JJ., concur.
Order modified, on the law and the facts, by reversing so much thereof as dismissed the complaint for failure to state a cause of action with respect to Parts 7004, 7025 and 7026 of title 9 of the Official Compilation of Codes, Rules and Regulations, and by granting a preliminary injunction enjoining the enforcement of Parts 7004, 7025 and 7026 of title 9 of the Official Compilation of Codes, Rules and Regulations, and, as so modified, affirmed, without costs.