The opinion of the Court was delivered by
Judge Watts, A. A. J.This is an appeal from a per-emtory writ of mandamus issued by his Honor, Judge Witherspoon, directing the sheriff of Abbeville County to sell certain real estate. The order of his Honor, Judge Witherspoon, should be incorporated in the report of this case. The facts of the case are: on salesday in September, 1889, the sheriff of Abbeville County, after due advertisement, sold at public outcry all of the right, title, and interest of E. M. Pope in the premises described in the petition herein, to satisfy sundry executions against said F. M. Pope. *396At the time of said sale the judginent of E. P. Matthews, as executor, &c., against E. M. Pope, was of record in the office of the clerk of court for Abbeville County. At said sale C. Aultman & Co. became the purchasers and received sheriff’s titles to said premises. In 1890, Nance, successor to'former sheriff, advertised for sale the same premises under execution issued upon the Matthews judgment. Whereupon the said sheriff was served -with notice that the homestead of E. M. Pope in said premises had been adjudged to belong to A. J. Salinas & Son; that by an order of Court he had proceeded to set off and assign it to A. J. Salinas & Son; that an appeal from the return of commissioners in homestead is now pending, and that if he should persist in selling the said premises, he and his bondsmen would be proceeded against. Thereupon the sheriff, acting under the advice of his counsel, declined to sell. Application for a writ of mandamus to compel him to sell was made to his Honor, Judge Witherspoon, who granted the writ. From this order the defendant appeals on seven grounds, all which allege error on the part of his Honor, Judge Witherspoon in directing a peremptory writ of mandamus to issue. To us it seems that he was in error in so deciding.
1 The principle of law in this State is too well settled to admit now a question, that where a sale of property is made under an execution, such sale divests the lien of all judgments, whether execution has been issued upon them or not, and that it is the duty of the sheriff to apply the proceeds of such sale to the various judgments having a lien according to their rank. As is said by learned counsel for appellant herein, “Throughout an unbroken chain of decisions, commencing with Snipes against the sheriff of Charleston, 1 Bay, 295, down to the case of Garvin v. Garvin, 34 S. C., 388, this has been the accepted doctrine in South Carolina.” In the case of Trumbo v. Cummings, 20 S. C., 336, Mr. Justice McIver, in delivering the opinion of the Court, said: “Ever since the case of Snipes v. the Sheriff of Charleston, 1 Bay, 295, and Greenwood v. Naylor, *3971 McCord, 414, followed by Gist v. Mcjunkin, 1 McMull., 342, Vance v. Red, 2 Speers, 90, and McKnight v. Gordon, 13 Rich. Eq., 222, recognized in the recent case of Agnew v. Adams, 17 S. C., 364, it has been uniformly held in this State, that a sale by the sheriff under a junior judgment divests the lien of the senior judgments and confers a good title on the purchasers. The senior judgments being first entitled to the proceeds of the sale in the order of their priorities.” Such being the law in this State, and Matthews’ judgment being the oldest lien upon the property sold, he had the right to demand that the proceeds of the sale be applied to his judgment, but he has no right to a resale, for he has no longer a lien on the property — that was divested by the sale, and his lien transferred from the property itself to the proceeds of sale. In Gist v. Mcjunkin, 1 McMul., 324, Mr. Justice O’Neall uses this language: “The judgment under which they now claim was recovered upon a judgment in favor of James Dugan against John T. Mcjunkin, on which there was an execution lodged in the sheriff’s office on 16th of October, 1826. The sheriff’s sale to Thompson was subsequent, and hence the sale would be referred, if the ordinary’s execution (the execution under which Thompson bought) was satisfied, to Dugan’s execution, and his judgment would be entitled to the proceeds of sale and not to the right to set up the satisfaction of the elder judgment and claim to resell the land.” But even if Pope’s homestead was liable to Matthews’ debt, as contended by counsel of respondent, and was not sold in 1889, still Judge Wither-spoon was in error in granting the order he did, for he did not attempt to limit the sale to homestead, but ordered all of the premises sold which had been sold in 1889. But it is unnecessary to pursue this view further, for, as we have already said, he was in error in granting the order he did at all. For, as we view the matter, B. P. Matthews, as executor, has now no legal rights as to the property in dispute; he no longer has any leviable interest in the premises sold.
*3982 *397Ordinarily a writ of mandamus may be issued to require *398an officer to perform any duty of a ministerial character pertaining to such office (State ex rel. Swinton v. Bates, 38 S. C., p. 326). But here, as we have seen, Matthews has no leviable interest in the premises sold, and has had none since the sale in 1889; since that time his lien has been divested and transferred from the premises to the funds arising from proceeds of said sale. Now, when the sheriff was threatening to sell, he was notified that he would sell a homestead which has been adjudged to belong to another, and if he persisted in so doing, he would do so at his peril. Right then he had the right to pause and refuse to proceed further until he wras protected by an order of Court; and he certainly had the right to appeal from the order of the Circuit Judge to the highest Court in the State, to get the law of the case fixed in a matter so seriously affecting his duties as sheriff, and his liability as such on his official bond, considering what a grave penalty is fixed upon him if he sells a homestead. Had he proceeded to sell under the order of his Honor, Judge Witherspoon, without appeal, he would have done so at his peril. “Where claims are seriously contested between third parties, which must be determined before it can be ascertained whether the sheriff is in default, a rule on the sheriff is not the proper mode of determining such contested claims, but the parties should be left to their action or other proceeding in which all persons interested can be made parties.” Corry v. Tate, 48 S. C., 548. In the case of Rowe v. Cockrell (Bailey’s Equity, 126,) it is held: “A sheriff is not bound to risk becoming a trespasser; and if the title of property levied on be disputed, he has the right to demand ample indemnity before he proceeds. He is not bound to act even if indemnity be rendered, but he may leave the parties to their remedy in equity.”
We are of the opinion that, in a case of this kind, mandamus will not lie. It is the judgment of this Court, that the order of the Circuit Judge be reversed, and that petition for mandamus and all proceedings thereunder be dismissed.