delivered the opinion of the court.
James B. Thurston filed his petition in the Circuit Court of Mathews county at its October term, 1891, praying for a writ of mandamus against Thomas J. Hudgins, one of the oyster inspectors of that county, to compel him to give notice to Sidney T. Mathews and T. Conkling, to remove their stakes and other obstructions from certain oyster ground described in said petition, and, in the event of their failure to remove such stakes and obstructions after they had received such notice, to compel the said oyster inspector to remove the same himself at the costs of said Mathews and Conkling. To this petition there was a demurrer, and the court, at its September term, 1893, sustained the demurrer, and dismissed the petition.
That judgment of the Circuit Court is now before this court upon a writ of error.
The plaintiff in error alleges in his petition that the said Hudgins, oyster inspector as aforesaid, had assigned (improvidently as petitioner supposed) to the said Mathews and Conkling, as a reservation for planting oysters and shells, twenty acres, or some part thereof, of the bed of Mobjack bay, lying in said county, and that the said Mathews and Conkling had proceeded to stake in the said described part of the hay so assigned to them by the said inspector for the purpose of planting oysters or shells thereon, and that they are now occupying the same for that purpose. It further 'alleges that the said twenty acres so assigned, or some part thereof, is a natural oyster bed, rock, or shoal, and that such natural oyster bed, rock, or shoal cannot be assigned to any person for his exclusive use or enjoyment, but must be held in common for the benefit of all the people of the Common*782wealth. It further alleges that the petitioner and other citizens of the Commonwealth had given notice to the inspector requesting him to give notice to Mathews and Conkling to remove their stakes and other obstructions from the bed so assigned them, and that Hudgins, inspector, refused to give such notice, or to remove the stakes and obstructions himself.
Sec. 2153 of the Code provides that:
“ It shall not be lawful for any person to stake in, or use for the purpose of planting oysters or shells, or for depositing oysters while making up a cargo for market, any natural oyster bed, rock, or shoal, or any part thereof; nor shall any persons, who may have occupied and staked off such natural bed, rock or shoal, continue to occupy the same. Bach inspector shall require any such person within his limits to remove all oysters planted, and all stakes, watch-houses, or other obstructions, from said natural beds, rocks, or shoals; and if after notice, such person refuse or fail to remove his stakes or other obstructions, the same shall be removed by the inspector at the cost of the offender; and, moreover, such offender shall be fined not less that fifty nor more than one thousand dollars.”
Sec. 2137 of the Code provides that the residue of the water fronts in excess of what is reserved for riparian owners, and the residue of the beds of the bays, rivers, and creeks, other than natural oyster beds, rocks, or shoals may' be occupied by any person for the purpose of planting or propagating oysters thereon. It also provides how any person desiring to make such location and obtain such right shall proceed, which provision is as follows:
“ It shall be the duty of any such person desiring to obtain a location for planting or propagating oysters on any portions of the water fronts and beds aforesaid, not located or reserved as hereinbefore provided for owners and occupants of land as aforesaid, to apply to an inspector to have his location ascertained and designated, and the same shall be marked with suitable stakes, or by other metes and bounds agreed upon between the applicant and inspector, and he shall pay the inspector for his services a fee of one dollar, and also an annual rent of twenty-five cents for each and every acre assigned to him, payable annually on the first day of *783October, and. thereafter he shall have the exclusive right to the use of such location so designated for the purpose aforesaid, so long as he complies with the provision requiring the payment of twenty-five cents per annum for every acre so occupied, subject, however, to the right of revocation by the General Assembly.”
The decision of this case turns upon the question whether the duties imposed upon an oyster inspector by the provisions of the Code above quoted are purely ministerial in their nature, or are duties necessarily calling for the exercise of judgment and discretion in their performance. If they belong to the latter class, the petitioner was not entitled to a mandamus upon the facts stated in his petition, and the demurrer ought to have been sustained; for it is well settled that mandamus will not lie to compel the performance of any act or duty necessarily calling for the exercise of judgment and discretion on the part of the official charged with its performance. 4 Minor’s Inst. (3 ed.) 398, <fcc., and cases cited; High on Extra. Rem., secs. 24, 44*; 2 Spellings Extr. Relief, secs. 1384,1433.
Mr. High says, in section 44, that “ where the official duty in question involves the necessity on the part of the officer of making some investigation, and of examining evidence and forming his judgment thereon ” mandamus will not lie. u Thus,” he says, “ where the question involved was, whether the relator, a printer to the Senate of the United States, was entitled to receive from the superintendent of public printing and print certain public documents, and in determining the question of the relator’s right, it was necessary for the superintendent to investigate the usages and practice of Congress upon the subject, and to examine evidence before forming his ultimate judgment, it was held that the duty was so far judicial in its nature that its performance could not be controlled by mandamus. So the issuing of a patent for public lands by the commissioner of the United States land office, being a duty which involves the exercise of judgment *784and discretion in passing upon the proofs presented and in determining the questions of fact involved, mandamus will not-lie to the Secretary of the Interior, or to the land commissioner.” U. S. v. The Commissioner, 5 Wall. 563; Secretary v. McGarrahan, 9 Wall. 298.
Under section 2137 of the Code it was made the duty of.' such inspector, when called upon by any one who desired to-make a location or entry of oyster grounds, to ascertain whether the location desired was such ground as under the-law could be set apart for the exclusive use of the applicant. To do this it would be necessary for the inspector to determine whether the location in question contained any natural oyster bed, rock, or shoal, whether it conflicted with the-claims of riparian owners who had superior rights under the-statute, or was for any other reason not subject to location by such applicant. This would require the examination of the premises, the investigation of facts, and the forming of his judgment thereon. It is clear, therefore, that the duties-of such inspector are not purely ministerial, but quasi judicial in their nature, requiring the exercise of judgment and discretion in their performance.
Not only were these duties quasi judicial, but the inspector had exercised his judgment, and ascertained that said twenty acres of oyster grounds were subject to such entry, and had assigned them. The petition admits this. The-object of the petitioner, therefore, was not only to compel, the inspector to undo what he had done, but to compel him to do a specific act without reference to the opinion of the-inspector upon the subject.
It is also well settled that mandamus does not lie to compel an officer to undo what he has done in the exercise of' his judgment and discretion, and to do what he had already determined ought not to be done, as is sought in this case.. 2 Spellings Ext. Relief, sec. 1436; State v. Rice, 10 S. E. R. *785833; 14 Am. & Eng. Enc. Law, 206; High on Ext. Leg. Item., sec. 141.
We are of opinion that the Circuit Court committed no error in sustaining the demurrer to said petition, and that its judgment should be affirmed.
Affirmed.