
214 Va. 314 (1973)
JOHN F. BELLAMY, JR.
v.
ERNEST P. GATES AND EDWARD P. GILL.
Record No. 8220.
Supreme Court of Virginia.
November 26, 1973.
Ivy P. Blue, Jr.,    for appellant.
Frederick T. Gray (Leonard A. Paris; Oliver D. Rudy; Morris E. Mason, on brief), for appellees.
Present, All the Justices.
1.  Bellamy complains of forced resignation from police force and seeks reinstatement and damages.  No liability on public official for damages resulting from his performance of a discretionary function.
2.  Under statute, chief of police lacks authority to appoint or discharge police officers.  Injunction does not lie to require performance of judicial function of appointing police officer.
3.  Judicial officers acting within their jurisdiction are exempt from liability in civil actions for their official acts although such acts are alleged to have been done maliciously or corruptly.  Appointment by judge of police officers is not ministerial act and involves judicial discretion.
Appeal from a decree of the Circuit Court of Chesterfield County.  Hon. Glyn R. Phillips, judge designate presiding.
Per Curiam.
John F. Bellamy, Jr. alleges that because of duress exercised on him by Ernest P. Gates, Judge of the Circuit Court of Chesterfield County, and Edward P. Gill, Chief of Police of the county, he resigned from the county's police force.  He sought (1) to enjoin and restrain Gates *315 and Gill from "refusing to reinstate him on the force", (2) to obtain an order directing them to reinstate him, and (3) to recover an award of both compensatory and exemplary damages.  A demurrer filed by Gates and Gill to Bellamy's bill of complaint was sustained, and we review this action of the lower court.
The governing body of Chesterfield County established its police force in accordance with the provisions of Chapter 21 of the Acts of the 1944 General Assembly.  Sections 3 and 4 of the Chapter are pertinent and provide as follows:
}"Section 3.  If any county shall establish a police department as authorized herein, the judge of the circuit court of the county, either in term or in vacation, shall appoint a chief of police for the county for a term to be fixed by the judge at the time of appointment, who shall have supervision of the police department so established.  The appointment shall be made upon the nomination of the governing body of the county if the nominee has the approval of the judge.  The chief of police may be removed by the judge for cause."
}"Section 4.  Appointment of police officers in the police department shall be made by the judge of the circuit court, either in term or vacation, upon the request and recommendation of the governing body of the county, which appointment shall be for such length of time as the judge shall designate.  Any such officer may be removed by the judge for cause."
Bellamy was appointed to the police force on November 15, 1965 and remained a member until January 5, 1971 when he resigned.  He is a member of the United Klans of America, Inc. and alleges that prior to his resignation he was advised by Gill that as an alternative to being discharged from the police force he could (1) resign from the Klan, renounce publicly the organization and its members and cease his association with them, or (2) remain a member of the Klan and become an informer for the Federal Bureau of Investigation on Klan activities and its members, or (3) he could resign from the police force.
The issue is whether or not plaintiff's bill and amended bill of complaint state a good cause of action.  The effect of the demurrer is to admit as true all allegations of material fact which are well pleaded.  The demurrer is filed to test whether the complaint states a cause of *316 action upon which relief can be had if all of its allegations are taken as admitted.     Smith Wolsiefer,    119 Va. 247, 89 S.E. 115 (1916).  In essence Bellamy alleges that he became the victim of a conspiracy participated in by agents of the F.B.I., the chief of police and the circuit judge, and that solely because of his membership in the Klan he was pressured by Gates and Gill into resigning from the police force.
  Assuming, as we must, that Gill, acting on orders of Judge Gates, relayed to Bellamy the alternatives he alleges, this does not of itself state a case of liability on the part of Gill.  Such action on Gill's part would not constitute the performance by him of a ministerial duty, and there is no liability on him as a public official for damages resulting from his performance of a discretionary function.     See Berry     Hamman,    203 Va. 596, 125 S.E.2d 851 (1962), and    Kirkstein     Rector and Visitors of the University of Virginia,    309 F.Supp. 184 (E.D. Va. 1970).
  Further, the other relief which Bellamy seeks can not be afforded him by the chief of police.  Gill did not appoint and could not reinstate Bellamy on the police force.  Neither could he modify or overrule the decision of the circuit judge.  Gill lacks the statutory authority to appoint or discharge police officers.
Injunction does not lie to require the performance of a judicial function, and Bellamy could not have secured his reinstatement on the police force by an injunctive order directed to either Gates or Gill.
  It is also a well established principle of the law that judicial officers, acting within their jurisdiction, are exempt from liability in civil actions for their official acts, although such acts are alleged to have been done maliciously and corruptly.     Pierson     Ray,    386 U.S. 547 (1967); Fraley     Ramey,    239 F.Supp. 993 (S.D.W. Va. 1965);    Hardy     Kirchner,
232 F.Supp. 751 (E.D. Penn. 1964);    Berry     Smith,    148 Va. 424, 139 S.E. 252 (1927);    Johnston     Moorman,    80 Va. 131 (1885).
In the instant case Bellamy alleges that Gates was acting in a ministerial capacity.  We disagree.  In    Dovel     Bertram,    184 Va. 19, 22, 34 S.E.2d 369, 370 (1945) we said:
{"In    Flournoy     Jeffersonville,    17 Ind. 169, 79 Am.Dec. 468, a ministerial act is thus defined:  'A ministerial act can perhaps be defined to be one which a person performs in a given state of facts and prescribed manner in obedience to the mandate of legal authority *317 without regard to, or the exercise of, his own judgment upon the propriety of the act being done.'"
{"The converse of the above rule is that if the act to be performed is of a discretionary nature, then the act of the court or judge becomes a judicial act and not merely ministerial.     Page     Clopton,    30 Gratt. (71 Va.) 415; Richmond     Epps,    98 Va. 233, 35 S.E. 723."
See also Penick     Ratcliffe,    149 Va. 618, 140 S.E. 664 (1927).
The statute clearly contemplates that appointments of police officers in Chesterfield County are to be court appointments, "either in term or vacation", performed by the judge as a judicial function, and one that requires the exercise by him of judicial discretion.  Bellamy's appointment was made by Judge Gates in his official capacity and under the authority of his office as a circuit court judge and in no other capacity.  As such he is afforded judicial immunity in a civil action.
However, this is not to say that a police officer appointed pursuant to Section 4 of Chapter 21 of the Acts of the 1944 General Assembly is without remedy if improperly removed from office.  Here Bellamy elected to resign.  Had he refused to do so he would have been entitled to a due process hearing.  The statute expressly provides that removal be "for cause".  This contemplates an evidentiary hearing at which a record would be made.  Any action then taken by the court removing an officer would be evidenced by an order of the court and subject to appeal and review by this court.
The judgment of the lower court is
Affirmed.
