Plaintiff appeals from a summary judgment dismissing his action for reinstatement as chief deputy sheriff of Sully County or, in the alternative, damages in the amount of $100,000.00 for lost earnings. We reverse and remand.
On December 5, 1978, the county commissioners of Sully County and the city council of the city of Onida, acting pursuant to SDCL ch. 1-24, entered into what was denominated a “Combined Law Enforcement Agreement” (the Agreement). The Agreement, which became effective January 1, 1979, granted to the Sully County Law Enforcement Commission “such law enforcement powers as are otherwise granted to said county and municipality by the statutes of the State of South Dakota.” The Agreement created an integrated law enforcement department, consisting of the sheriff, one chief deputy, one additional deputy, and such other staff as might later be authorized by the contracting parties. The integrated law enforcement department was to be under the general supervision of the sheriff’s office.
The Agreement contained the following provision regarding appointments:
2. Appointments:
The Sheriff shall be the duly elected, qualified and acting Sheriff of the County of Sully, State of South Dakota. The Sheriff shall be head of the Department and be supervisor over all officers and members thereof. All other positions and future vacancies in the Department *574will be filled by the appointment of the Sheriff subject to the confirmation of the Commission after screening interviews by the said Commission. Additionally, the Sheriff may terminate the appointment of any employee or officer at any time for just cause, subject to the approval of the Commission.
The agreement was renewed on April 7, 1981, for a period ending on June 1, 1982.
Defendant, Maynard Bloom (Bloom), was serving as sheriff of Sully County on the date the agreement became effective. Pursuant to the Agreement, he assumed the position of head of the integrated law enforcement department. Plaintiff, Richard Groseclose (Groseclose), who had served as chief of police for the city of Onida from June 1962 to June 1969 and again from August 1974 to January of 1979, was appointed as chief deputy.
Groseclose opposed Bloom in the 1982 election for the position of sheriff of Sully County. Bloom was re-elected by a margin of some 100 votes in the November 2,1982, general election. On November 3, 1982, Groseclose called Bloom and congratulated him on his victory, whereupon Bloom immediately asked Groseclose for his resignation. After Groseclose refused to tender his resignation, Bloom told Groseclose that he should consider himself fired. Groseclose spoke with the mayor of Onida, who informed him that Bloom was without authority to discharge him and that he should return to work. Groseclose returned to work on November 8, 1982, and was immediately placed on sick leave by Bloom until November 12, 1982. When Groseclose arrived for work on the afternoon of November 12, he was immediately placed on thirty days’ probation by Bloom because of his alleged failure to give written notice of his intended vacation dates and his inability to get along with his fellow officers.
Groseclose worked the next two days without incident or objection. On November 14, 1982, he sent Bloom a letter stating that it was his belief that he could not be put on probation without first being given a hearing before the law enforcement commission. When Groseclose arrived for work on November 15, Bloom handed him a letter informing him that his position was terminated as of that date. Groseclose commenced this action against Bloom in January of 1983.
SDCL 1-24-2 provides:
Any power or powers, privileges or authority exercised or capable of exercise by a public agency of this state may be exercised and enjoyed jointly with any other public agency of this state having such power or powers, privilege or authority, and jointly with any public agency of any other state or of the United States to the extent that the laws of such other state or of the United States permit such joint exercise or enjoyment. Any agency of South Dakota state government when acting jointly with any public agency may exercise and enjoy all of the powers, privileges, and authority conferred by §§ 1-24-2 to 1-24-9, inclusive, upon a public agency.
SDCL 1-24-3 provides in part that “[a]ny two or more public agencies may enter into agreements with one another for joint or cooperative action pursuant to the provisions of §§ 1-24-2 to 1-24-9, inclusive .... ”
As used in SDCL ch. 1-24, “public agency” includes counties and municipalities. SDCL 1-24-1(1).
SDCL 7-12-10 provides in part:
The appointment of each deputy, jailer and clerk shall be made by the board of county commissioners, on the recommendation of the sheriff, in writing, filed with the county auditor. Such appointment may be revoked in the same manner. ...
SDCL 7-12-11 provides:
The sheriff shall be responsible for the acts of each such deputy, jailer and clerk in the performance of the duties of his office, provided, however, that the sheriff may relieve any deputy, jailer or clerk of any or all official responsibilities and duties, summarily.
*575The trial court held that SDCL 7-12-11 allows a sheriff to summarily relieve a deputy of all official responsibilities and duties without providing any notice or opportunity to be heard concerning the reasons for dismissal. The trial court further held that Paragraph 2 of the Agreement was an invalid attempt on the part of county officials to contract away the sheriffs statutory authority. We do not agree with either of the bases of the trial court’s decision.
In Rosander v. Bd. of County Comm’rs of Butte County, 336 N.W.2d 160 (S.D.1983), we held that by enacting SDCL 7-12-10 the legislature intended to, and did, grant to boards of county commissioners the authority to appoint deputy sheriffs and clerks. We adhered to our holding in Rosander in Wahl v. Moses, 339 N.W.2d 792 (S.D.1983). In Walker v. Bd. of County Comm’rs of Brule County, 337 N.W.2d 807 (S.D.1983), we held that SDCL 7-12-10 confers upon boards of county commissioners general jurisdiction regarding the hiring and firing of deputy sheriffs.
We see no reason to depart from these holdings. Accordingly, we hold that the trial court erred in ruling that Bloom had unfettered discretion to terminate Groseclose’s employment without notice, hearing, or justification.
We perceive no reason why a board of county commissioners’ final authority to terminate a deputy sheriff’s employment may not be validly shared and exercised with another agency under the broad authority granted to public agencies by SDCL ch. 1-24 to jointly exercise their power and authority. As indicated above, SDCL 1-24-2 specifically provides for the joint exercise by a public agency of its power, privileges, and authority. Accordingly, we hold that the board of commissioners of Sully County acted well within their statutory authority in including Paragraph 2 within the Agreement, with the result that it was the Sully County Law Enforcement Commission that possessed the authority to approve or disapprove Groseclose’s discharge, assuming that the Agreement was still in effect at that time.
It follows that there remains to be resolved a genuine issue of material fact regarding the propriety of Groseclose’s discharge. Accordingly, summary judgment should not have been entered. SDCL 15-6 — 56(c); Wilson v. Great Northern Ry. Co., 83 S.D. 207, 157 N.W.2d 19 (1968).
During oral argument a question was raised whether the Agreement was in force and effect at the time that Bloom purported to terminate Groseclose’s employment. Likewise, a question was raised whether Groseclose had joined all necessary parties in his action. We conclude that these questions should be resolved in the trial court upon remand.
The summary judgment is reversed and the case is remanded to the circuit court for further proceedings.
All the Justices concur.
WUEST, Circuit Judge, Acting as Supreme Court Justice, participating.