
15 Ill. App.3d 832 (1973)
305 N.E.2d 273
EXCELLENT BUILDERS, INC., Plaintiff-Appellant,
v.
PIONEER TRUST AND SAVINGS BANK et al., Defendants-Appellees.
No. 55789.
Illinois Appellate Court  First District (2nd Division).
November 6, 1973.
Rehearing denied December 11, 1973.
*833 Ash, Anos and Harris, of Chicago (Howard A. Harris and Lawrence Freedman, of counsel), for appellant.
Albert J. Horrell, of Chicago, for appellees.
Reversed and remanded.
Mr. JUSTICE HAYES delivered the opinion of the court:
The appeal in this case arises out of a complaint in chancery to establish and foreclose a mechanic's lien. Prior to 21 August 1967, plaintiff-appellant Excellent Builders, Inc. (hereinafter plaintiff) bid on a construction job for the construction of an office building on the southeast corner of Devon and Avers Avenues in Chicago. Plaintiff prepared its bid on the basis of plans and specifications prepared by defendant-appellees' architect. On 21 August 1967, plaintiff was awarded the contract. Plaintiff agreed to supervise, and furnish all labor and materials for, the construction of the office building for the sum of $188,700. This contract was later ratified by defendant Pioneer Trust and Savings Bank in its capacity as land trust trustee.
Shortly thereafter, plaintiff, by its president Harry Brooks, paid for and procured a building permit from the City of Chicago. The record indicates that the building permit issued on the basis of the plans, specifications, and recommendations on which plaintiff had prepared its bid. After the building permit had been issued, plaintiff constructed the first deck of the building and erected steel columns in accordance with the plans and specifications.
On 31 October 1967, the Department of Buildings revoked the building permit, after which plaintiff ceased operations. The Department had discovered that the planned and actual position of the building on the lot violated certain city zoning ordinances concerning side yard and setback requirements.
On 17 January 1968, plaintiff filed this suit to establish and foreclose a mechanic's lien. To the date on which it had ceased operations, plaintiff *834 alleged that it had furnished materials and services in the amount of $74,418. Of this amount, defendant had paid only $10,000. Plaintiff sought a lien in the amount of the balance. Defendant answered on 16 February 1968, at which time it also filed a counterclaim alleging breach of contract by plaintiff. The breach complained of was plaintiff's failure to secure a proper building permit which, under the terms of the contract, it was bound to do.
Subsequently, defendant filed a motion for summary judgment in its favor and against plaintiff on plaintiff's complaint. The basis for the motion was that, since the contract on its face violated the Chicago Zoning Ordinance, it was illegal and would not support a mechanic's lien. In its counteraffidavits, plaintiff alleged that the building permit had been issued by the Department primarily as the result of active wrongdoing on the part of one of the beneficiaries of the land trust. Plaintiff alleged that the said beneficiary had, in July of 1967, applied for and received from the City Council a rezoning of the premises based on a set of plans for the construction of this office building, which plans fully complied with the zoning ordinances as rezoned. The beneficiaries, in advance of the construction of the building, had entered into a lease of the improved premises; one provision of the said lease required the lessor to provide on the premises a parking space for 35 vehicles. The beneficiaries then discovered that it would be impossible to provide such a space, were the building to be constructed according to the plans on the basis of which the rezoning had been obtained. Hence, the beneficiary in question had the architect draw up another set of plans which provided the said parking space, but which, in order to do so, required that the building be built in violation of certain setback requirements of the zoning ordinance as rezoned  a fact actually known both to the beneficiary and the architect. Plaintiff then alleged that the beneficiary in question had instructed the architect to misrepresent to an official of the Building Department that the plans to be submitted to the Department for the building permit approval were the same plans which had been considered and approved by the City Council in rezoning the premises. Plaintiff further alleged that it had no part in the drafting of the illegal plans; that it had no actual knowledge of the illegality of the plans when it had made its bid on the basis of those plans, nor at any time thereafter until the revocation of the building permit; that it had made no misrepresentation to officials of the Building Department or to anyone, but had merely passively submitted the illegal plans pursuant to its contractual duty to secure the building permit, which had thereupon been issued. Plaintiff's theory was that, even if the contract were illegal (which plaintiff did not concede), the parties were not in pari *835 delicto because President Brooks had merely delivered the plans (which had been furnished him by defendants' architect) to the Building Department and had not participated in the alleged fraud which resulted in the issuance of the void and revocable permit. Therefore, plaintiff would not be barred from obtaining its lien.
Prior to the hearing on the motion for summary judgment, defendants filed a motion for a protective order prohibiting further discovery. In order to support the allegations in its counteraffidavits, plaintiff had desired to obtain the deposition of the beneficiary of the land trust accused of wrongdoing, as well as the deposition of the city official to whom these alleged misrepresentations had been made. The basis for defendants' motion was the contention that the only issue before the court was the validity of the contract, which could be determined from the face of the contract, and that plaintiff should not be permitted to take any depositions other than those which would be relevant to the issue of the validity of the contract. The trial court granted defendants' motion and entered a protective order prohibiting further discovery.
After a hearing, the trial judge granted the motion for summary judgment. In so doing the trial court held the contract to be illegal on its face and unenforceable. It also held that it had no authority to weigh degrees of culpability in a mechanic's lien suit. Finally, the trial court upon its own motion dismissed defendants' counterclaim (because defendant was equally unable to enforce an illegal contract).

OPINION
 1 The granting of a motion for summary judgment is proper if upon examination of the record it can be fairly said that no triable issue of fact exists. (Goodwin, Inc. v. George W. Bowers Co. (1960), 24 Ill. App.2d 158, 164 N.E.2d 278; Ray v. City of Chicago (1960), 19 Ill.2d 593, 169 N.E.2d 73.) As we shall explain hereafter, we are of the opinion that a triable issue of fact is present in this case and that the motion for summary judgment was improperly granted below.
As the necessary basis for a lien, the statute requires a contract (Ill. Rev. Stat. 1967, ch. 82, § 1), and the cases have construed the statute to require a valid contract. (Pascal P. Paddock, Inc. v. Glennon (1965), 32 Ill.2d 51, 203 N.E.2d 421; Rittenhouse & Embree Co. v. Warren Construction Co. (1914), 264 Ill. 619, 106 N.E. 466.) Defendants contend that, since the contract in question violates the City ordinance, the contract is illegal and void and, as a matter of law, cannot be the foundation for a claim of a mechanic's lien in favor of plaintiff.
Plaintiff, on the other hand, first offers three theories, any one of which, it contends, would have enabled the contract in the case at bar to have become a legal contract or at least to have become legally performable. *836 Plaintiff contends that: (1) defendants could have relocated the building in conformance with the applicable side yard requirements; (2) defendants could have obtained a variation from the City with respect to the front setback and side yard requirements; and (3) defendants could have continued construction in reliance on the City's approval of the plans and specifications submitted to the Building Department and the issuance of the building permit pursuant thereto. The validity of these theories would, it is contended, then give rise to triable issues of fact. None of these theories, however, has any application to the facts of this case.
 2 As to whether defendants could have relocated the building in conformance with the applicable side yard requirements or whether the defendants could have obtained a variance, we agree that both of these alternatives were possible. However, the contract in the case at bar does not impose any duty on defendants to take either of those courses of action. It is not for the courts to impose such a duty. A court will not allow recovery or determine rights upon a contract other than the one entered into between the parties. Freeland v. Edwards (1957), 11 Ill.2d 395, 142 N.E.2d 701.
 3 Likewise, the theory that the defendant had a vested right to continue construction because the City would be estopped from enforcing a violation of the zoning ordinance is inapplicable to the case at bar. Estoppel generally arises in zoning cases in two situations. The first is where there has been a substantial change of position, expenditures, or incurrence of obligations under a building permit validly issued, which permit is later revoked because of subsequent zoning or changes in zoning. (See Deer Park Civic Ass'n v. City of Chicago (1952), 347 Ill. App. 346, 106 N.E.2d 823.) The second situation is where there has been a substantial change of position under an invalid permit and the party to whom the permit was issued had been actively misled by city officials. (See Cities Service Oil Co. v. City of Des Plaines (1961), 21 Ill.2d 157, 171 N.E.2d 605.) Neither of these fact patterns are involved in the case at bar.
Plaintiff's final contention is that, even if the contract is illegal, the relative magnitude of defendants' misconduct would still render the contract enforceable against them by plaintiff under the doctrine of the balancing of degrees of culpability, thereby giving rise to an issue of fact, namely, the determination of the degrees of culpability of the parties. The doctrine of the balancing of degrees of culpability was discussed in the case of Evans v. Funk (1890), 151 Ill. 650, 38 N.E. 230. The Supreme Court stated:
"It is true, as a general rule, that when two or more persons engage *837 in an unlawful enterprise, or agree to do an illegal act, or one prohibited by public policy, and spend or pay out money to each other or otherwise in aid of some unlawful enterprise, the law will aid neither, and leave them where they place themselves. But this general rule has its exceptions, arising out of necessity or from unyielding principles of public policy or from the different conditions of the parties. The different degrees of turpitude, immorality, or illegality may be so great between different persons engaged in such acts that the general rule will bend to meet the demands of such case and allow a recovery. In Story's Equity Jurisprudence, section 300, it is said that `in cases where both parties are in delicto, concurring in illegal acts, it does not follow that they are in pari delicto, for there may be, and often are, very different degrees in their guilt. One party may act under circumstances of oppression, imposition, hardship or undue influence, or great inequality in conditions of age, so that his guilt may be far less in degree than that of his associate in the offense. And, besides, there may be, on the part of the court itself, a necessity of supporting the public interest or public policy in many cases, however reprehensible the acts of the parties may be.' In strict harmony with the principles announced by Story, are also the following cases. White v. Franklin Bank, 22 Pick 181; Tracy v. Talmage, 14 N.Y. 162-193; Quirk v. Thomas, 6 Mich. 111; 1 Smith's Leading Cases, 708."
The question for this court to decide is whether this equitable exception to the equitable doctrine of leaving cowrongdoers in the position in which they have placed themselves, which exception is applicable in actions between such parties for breach of contract or on the common count of quantum meruit, is equally applicable in an action between such parties for the establishment of a mechanic's lien. We have been cited to no Illinois case, and our search has revealed none, where the balancing of degrees of culpability has been either accepted or rejected in a mechanic's lien action.
The statutory mechanic's lien action is in derogation of the common law, and for that reason the Mechanic's Lien Act has been held to require strict construction with reference to the requirements upon which the right to a lien depends, even though the Legislature has provided that the Act is to be liberally construed as a remedial act. Erickson v. Ginocchio (1940), 303 Ill. App. 159, 24 N.E.2d 884; Ill. Rev. Stat. (1967), ch. 82, par. 39.
But, despite this requirement of strict construction, allegedly illegal contracts have been held legal and capable of supporting a lien in situations *838 in which the alleged illegality related solely to the performance of the contract by the contractor-builder seeking the lien, and the performance of the contract was not injurious to the public order. (Pascal P. Paddock, Inc. v. Glennon (1965), 32 Ill.2d 51, 203 N.E.2d 421; Douglas Lumber Co. v. Chicago Home for Incurables (1942), 380 Ill. 87, 43 N.E.2d 535.) We see no reason why we should not adopt a similarly "liberal" construction as to recovery by lien between the parties themselves where the active misconduct of one party to the illegal contract has not only created the illegality with actual knowledge thereof but has then caused the improper issuance of the building permit, whereas the misconduct of the other party to the illegal contract has occurred without actual knowledge and consists of cooperation of a relatively passive and ministerial nature. Giving this limited, purely inter party, validity to this contract would not be injurious to the public order. On the contrary it would merely prevent the more culpable party from benefitting from his own wrongdoing, thereby contributing to the public order.
Having determined that the doctrine is applicable in a mechanic's lien action, we must determine whether plaintiff has alleged sufficient facts to bring it within the operation of the doctrine. If such facts are alleged, plaintiff created an issue of fact making summary judgment unavailable.
 4 On their face, plaintiff's allegations of fact might appear to establish merely that defendants had perpetrated a fraud on the City of Chicago and not, as required, on plaintiff. But, carefully analyzed, plaintiff's allegations establish that, while defendants' conduct directly or primarily perpetrated a fraud on the City of Chicago, it also indirectly or secondarily perpetrated a fraud on plaintiff by causing plaintiff to act to its detriment in reliance on the fraudulently issued and therefore revocable permit. Furthermore, as between the parties, plaintiff's participation in the fraud on the City of Chicago was purely formal and passive in that, as required by the contract, it merely applied for the permit on the basis of the illegal plans and specifications which had been furnished to it but took no active part in the alleged fraud by reason of which the permit wrongfully issued. It is our opinion that the allegations of fact, if true, would invoke the doctrine of imbalance of culpability as between the parties and, therefore, raised an issue of fact which made summary judgment unavailable.
Because we have decided that plaintiff's counteraffidavits do give rise to a relevant issue of fact relating to the balancing of culpabilities and that summary judgment was therefore improper, it may be that we have overruled the sole basis upon which the trial court issued its protective *839 order against discovery by plaintiff. In any event, since we are reversing the summary judgment for defendants and are remanding the cause for further proceedings not inconsistent with this opinion, we do so without prejudice to the right of plaintiff to renew its motion for discovery, upon which the trial court may then rule on grounds not inconsistent with this opinion.
Reversed and remanded.
STAMOS, P.J., and LEIGHTON, J., concur.
