Fish, J.
The forum in which the plaintiff elected to test the righteousness of his complaint was one exercising equitable jurisdiction. His prayer was for specific performance of a contract — a purely equitable remedy. He chose to invite the -court to pass upon his equitable, rather than upon his strictly *534legal rights in the premises. In defense to the action, the defendant was permitted to allege, and to submit evidence to sustain his contention, that the time for such performance had not as yet arrived, for the reason that the plaintiff had expressly agreed to become answerable for certain obligations on the part of his son, which had not been met, and that the title to the land in controversy should be held by the defendant as security until his claims against the son had been fully satisfied. This agreement was not in writing, and the plaintiff therefore sought, but without success, to induce the trial court to ignore it, his position being that such an agreement comes within the operation of the statute of frauds, and is, in consequence, of no binding legal effect. That is to say, the plaintiff apparently recognized that unless he could avail himself of his purely technical, legal right to repudiate this alleged agreement, his prayer for the equitable relief sought would be painfully lacking in moral support. The question is therefore squarely presented, whether or not he is at liberty to insist that the court close its eyes to the uncom scionable advantage it is alleged he thus seeks to gain over his adversary, to the end that he may procure its aid, regardless of the hardship which will be entailed upon the defendant. .
In the first place, it may be remarked that specific performance is a remedy which “is never to be demanded as a matter of absolute right in either party” to a contract, “and a much stronger case is required to maintain the suit than to defeat it.” 22 Am. & Eng. Ene. L. 911, 912. “Equity will not decree specific pérformance unless strictly equitable.” Ibid. 931. On the contrary, “In all cases where it is clearly inequitable to grant it, the court will refuse to do so. In exercising its discretionary powers, it will act with more freedom than when exercising its ordinary powers.” Fry, Spec. Perf. (3d ed.) 23, n., citing numerous cases. As has often been said, the granting or withholding of this peculiar relief is “in the discretion of the court. . The meaning of this proposition is, not that the court may arbitrarily or capriciously perform one contract and refuse to perform another, but that the court has regard to the conduct of the plaintiff and to circumstances outside the contract itself, and that the mere fact of the existence of a valid con*535tract is not conclusive in the plaintiff’s favor.” Accordingly, if the defendant “can show any circumstances dehors, independent of the writing, making it inequitable to interpose for the purpose of a specific performance, a court of equity, having satisfactory information upon that subject, will not interpose.” Ibid. § 25. And to the same effect, see Pomeroy on Contracts, § 36 et seq.; Civil Code, § 4040.
It follows that, looking in each instance to the peculiar circumstances surrounding the parties, a court of equity may often impose terms upon the plaintiff as a condition precedent to the granting of the relief sought. Thus, “where a trustee had purchased land in his own name but really for the cestui que trust, and had paid the purchase-money with his own funds and was a creditor of the cestui que trust for other advances made to or for him, it has been held that such beneficiary . could not compel a conveyance from the trustee to himself, except upon payment of his entire indebtedness, as well that growing out of this purchase as that arising from the other advances.” 1 Pom. Eq. Jur. §392. “The principle that he who comes into the court seeking equity — that is, seeking to obtain an equitable remedy — must himself do equity,’ means not only that the complainant must stand in conscientious relations towards his adversary, and that the transaction from which his claim arises must be fair and just in its terms, but, also, that the relief obtained must not be oppressive nor hard upon the defendant, and must be so shaped and modified as to recognize, protect, and enforce all his rights arising from the same subject-matter, as well as those belonging to the plaintiff.” Pomeroy on Contracts, § 175. This being true, specific performance will be'denied, not only where “the plaintiff has obtained the agreement by sharp and unscrupulous practices,” or where the “contract itself is unfair, one-sided, unjust, unconscionable, or affected by any other such inequitable feature,” but also where it appears “the enforcement itself would be oppressive or hard upon the defendant, or would prevent the enjoyment by him of his own rights, or would in any other manner work injustice.” Ibid.
Unquestionably, as is urged by the plaintiff in the present *536case, the statute of frauds proclaims a definite public policy as regards the enforcement of a promise not in writing and signed by the party to be charged therewith, “to answer for the debt, default, or miscarriage of another.” See Civil Code, § 2693. But it does not follow that a court of equity, in reaching its determination whether or not a party is entitled to extraordinary relief which he can not demand as matter of right, is not at liberty to weigh the equitable, as well as the strictly legal rights of himself and his adversary. The real purpose of the statute is always to be kept consistently in view. “As its primary object is to prevent mistakes, frauds and perjuries, by substituting written for oral evidence in the most important classes of contracts, the courts of equity have established the principle, which they apply under various circumstances, that it shall not be used as an instrument for the accomplishment of fraudulent purposes; designed to prevent fraud, it shall not be permitted to work fraud. This principle lies at the basis of the doctrine concerning part performance, but is also enforced whenever it is necessary to secure equitable results.” Pomeroy on Contracts, §71. Indeed, it is an established rule in equity “that á man shall not be permitted to use a statute, more than any other assistant, for the purpose of promoting his own fraudulent intents or defending his own fraudulent conduct.” Ibid. §103. Certainly, in the case now before us, it was eminently proper for the court to hear evidence concerning the agreement on the part of the plaintiff which was set up as matter of defense. Conceding that this evidence established no right, legal or equitable, which could be enforced in behalf of the defendant, it nevertheless was competent as going tp show that the plaintiff was not entitled to the remedy he attempted to invoke. “Even the statute of frauds can not, by shutting out parol evidence, be converted into an instrument of fraud or wrong.” 2 Pom. Eq. Jur. § 858. In all proceedings where extraordinary equitable relief is sought, the court should open wide the door to pertinent evidence, to the end that the truth concerning the transaction under investigation may fully appear, and that the court may act advisedly and wisely in the premises. “ Parol evidence must be admitted in these classes of cases, in order to a *537clue administration of justice. If the general doctrine of the law or the statute of frauds was regarded as closing the door against such evidence, the injured party would be without any certain remedy and fraud and injustice would be successful.” Ibid. § 859. To extrinsic circumstances must the court necessarily often look in determining whether or not a specific performance of a contract may equitably be decreed. Pomeroy on Contracts, §183. The very fact that a plaintiff manifests a dis-| position to inequitably repudiate an agreement by which he is not in strict law bound may often, furnish an all-sufficient reason •why he should be remitted to his legal remedies rather than be afforded fuller aid and protection by a court of equity.
The conclusion inevitably to be reached in the present case is, we think, that the court properly allowed the defendant to interpose and to submit evidence to establish the defense above indicated. It follows, of course, that the charge complained of, in which the trial judge instructed the jury as to their finding in the event they should believe the testimony introduced in support of this defense, was pertinent and correctly presented the issue upon which they were to pass. So far, therefore, as the verdict is concerned, it should stand, as there was ample evidence to warrant the jury in their finding.
. The decree entered up by the court is, however, in one respect unauthorized; and as exception is made thereto, it should in this particular be corrected. We refer to that portion which adjudges that the land in controversy shall be held by the defendant as security for the payment of the debt of the plaintiff’s son, for which, defendant alleged, the plaintiff had by a parol agreement undertaken to become answerable and to pledge the land as security. Doubtless it was within the power t of the court to impose terms upon the plaintiff, and to decree that this debt should be discharged by him as a condition precedent to the granting of the relief sought; but it was not likewise within the power of the court to adjudge that this debt should constitute a special lien on the land, irrespective of the plaintiff’s election to accept the terms upon which the court was willing to grant relief. In other words, we wish to - be understood as holding that while the parol contract set up by the *538defendant afforded a sufficient reason for denying the remedy of specific performance, it could not itself be enforced in disregard of the statute of frauds, so as to bring about the result reached by the trial judge in framing this portion of the decree. Appropriate direction, which we have given, will, however,, cure this infirmity.
Judgment affirmed, with direction.
All the Justices concurring~