
50 Ill. App.3d 365 (1977)
365 N.E.2d 688
MERCHANDISE NATIONAL BANK OF CHICAGO, Plaintiff,
v.
MARSHALL KOLBER, Defendant and Third-Party Plaintiff-Appellee.  (WILLIAM F. BOCHTE, Third-Party Defendant-Appellant.)
No. 63217.
Illinois Appellate Court  First District (5th Division).
Opinion filed June 24, 1977.
*366 Lupel & Amari, of Chicago (Leonard F. Amari and Warren Lupel, of counsel), for appellant.
Joseph L. Goldberg, of Chicago, for appellee.
Reversed and remanded.
Mr. JUSTICE MEJDA delivered the opinion of the court:
The Merchandise National Bank of Chicago (Bank) brought action upon a note executed by Marshall Kolber, which was in default. Kolber in turn filed a third-party complaint against William F. Bochte and Barry J. Fox, based upon their indemnity agreement and note to Kolber in connection with his primary note to the Bank. Only Bochte answered the third-party complaint. Judgment was entered on the pleadings as to the complaint in favor of the Bank and against Kolber. Following a bench trial, judgment was entered for Kolber and against both Bochte and Fox as to the third-party complaint.
Bochte alone prosecutes this appeal. He contends that the indemnity agreement was unenforceable for lack of a valid consideration and that Kolber's failure to raise the defense of forgery in the original action freed Bochte of any obligation under the indemnity agreement. He also contends that the trial court erred in refusing to permit Bochte to adduce evidence relating to Kolber's knowledge of and participation in the overall transaction, which resulted in Federal convictions of others and which, he says, bars Kolber's recovery in this third-party action on the ground that Kolber was in pari delicto with those found guilty.
We reverse the judgment as to Bochte and remand. The pertinent facts from the record will be summarized.
Barry J. Fox was licensed to practice law in Illinois sometime prior to 1968, and had known Kolber, a chiropractor, since high school in 1954. Bochte was licensed to practice law in Illinois in November 1969, and had previously performed law clerk services in Chicago for various attorneys, including Fox. Sometime prior to trial herein, Fox had pleaded guilty to Federal indictments returned in connection with the events herein and had his name stricken from the roll of attorneys in Illinois.
Previous to the instant events, Fox established a law office on North Dearborn Street in Chicago, and Bochte became associated with him as a clerk. Both before and after Bochte's admission to the bar, Fox represented Kolber on several legal and business matters, and at times had turned over various matters to Bochte to handle. A law association was formed between Fox and Bochte upon the latter's admission to the bar in 1969. Sharing the law offices on North Dearborn Street with them was a third lawyer and three business entities in which Fox was interested. The name, Jerry Lewis Cinemas, appeared on the door.
*367 Both before and during his law association with Fox, Bochte obtained loans at the Bank for funds used in part by Fox. Bochte's parents lent their credit for a loan for Fox at the Bank as well. At the instant trial, Fox described himself as a "degenerate gambler" and stated that he had used others' funds to pay his gambling debts; that he "used" both Bochte and Kolber in obtaining funds for his own use; and that Bochte would do everything Fox would tell him to do.
In September of 1970, Kolber received a telephone call from the law offices of Fox and Bochte requesting Kolber and his wife to appear at the offices for a presentation concerning a franchise in the Jerry Lewis Cinemas. The Kolbers attended a meeting at the law offices, and stated at trial that Fox told them that a franchise was available in Colorado; that Fox and Bochte needed about $10,000 to secure the franchise; and that the lawyers were unable to obtain funding on their own since their credit was overextended. Kolber testified that Fox asked him to extend his credit for a loan at the Bank, the proceeds of which would be used by Fox and Bochte in the purchase of the franchise. There was also testimony that the Kolbers were told that they had everything to gain and nothing to lose since they were to receive royalties from the undertaking and that they would be indemnified by both Fox and Bochte. When Kolber told the lawyers that his credit was good but that he had some loans outstanding, the lawyers told him not to worry because they had a "contact" at the Bank who could get the loan.
Kolber testified further that they then went into Bochte's office where Bochte typed out a loan application and financial statement form which he took from his desk drawer. Kolber claimed that he gave only partial information as to his finances, and that he signed the form when only partially completed and was told by Bochte that the latter would complete the form. Bochte, conversely, testified that he took the Kolbers into his office, where Kolber penciled figures on a financial form provided by Fox; that Bochte simply tallied the figures and penciled in the totals; and that the finalized form was apparently signed by Kolber in Fox's office in the latter's presence. He related that before taking the information the Kolbers told him that they were procuring a loan for Fox to be used to purchase a theater franchise in Milwaukee which already was sought by other of Fox's business partners. The court sustained objections by Kolber to Bochte's questions concerning the truth and accuracy of the financial statement to the Bank. Bochte proposed to show by such testimony, and also by introduction of evidence of complicity by an agent for the Bank in the transaction, which the court also refused to admit, that Kolber was in pari delicto with the others to defraud the Bank, and consequently could not recover under the indemnity agreement.
*368 Several exhibits were entered into evidence at trial. Kolber testified that he received a letter dated September 24, 1970, signed by Bochte on his stationery, enclosing only the indemnity agreement but purporting to enclose both the agreement and a note to secure the agreement. He stated he called Bochte about the missing note and thereafter received a second letter, dated September 31, 1970, which was on Bochte's stationery and signed by him and by Fox. It enclosed the note and also guaranteed its payment out of Bochte's and Fox's estates in case of death.
Bochte testified that he had agreed to execute the indemnity agreement, but could not recall if he executed the agreement entered in evidence. He stated that he did execute the note securing the agreement and that he signed the indemnity agreement because he expected to be included in the franchise profits if the venture proved successful. Fox, however, testified that he had promised Bochte nothing for signing the indemnity agreement. Kolber testified that he gave Bochte nothing for the latter's signature thereon. Fox acknowledged at trial that he received the proceeds on the primary note from Kolber to the Bank and thereafter lied to Kolber as to that fact.
Kolber in 1972 received notice from the Bank that the primary note was in default. Bochte in late 1970 had vacated the offices which he previously shared with Fox. Kolber went to Bochte's new office to discuss the notice from the Bank. Kolber claimed at trial that Bochte then acknowledged his obligation on the undertaking but told Kolber to secure another 90-day extension of the note while Bochte tried to contact Fox to clear up the matter. Kolber testified that Bochte gave him a check which covered the interest due on the primary note, but later told Kolber he would honor only half of the obligation.
Kolber executed renewal notes extending the primary obligation every 90 days, which he allegedly was told to do by Fox and Bochte at their initial meeting in September 1970. He related that he signed several of the renewal notes but others had already been signed with his name. Kolber testified that he gave no one authority to sign his name to the renewal notes or to the proceeds check and that he personally considered such other signatures to be forgeries, but was advised by his lawyer that they were not forgeries because Kolber had agreed to do everything necessary to procure the funds from the Bank.
Arguments were presented and briefs thereafter filed. On August 7, 1975, the trial court orally announced in pertinent part:
"And I find that there was no consideration; that anything was mere expectation mostly and a type of arrangement. And accordingly, there being no consideration, the indemnification contract is not binding in my opinion. The other arguments of the *369 third party defendant, if William F. Bochte had received consideration, I would have to say that these other arguments would help the third party defendant, Bochte, get out of the agreement. Therefore, I might agree that it is unnecessary to announce any finding as to those issues."
The trial court there further found in favor of Kolber and against Fox for $16,828.88, and in favor of Bochte against Kolber, and directed that an order be prepared and presented for entry. Instead, however, Kolber and Bochte subsequently submitted letter memorandums as to the applicability of Lauer v. Blustein (1971), 1 Ill. App.3d 519, 274 N.E.2d 868. On September 2, 1975, after further argument, the trial court reconsidered its prior finding and sustained Kolber's argument that Lauer controlled the consideration issue and required an opposite result as to Bochte. The trial court summarily disposed of the other two issues raised by Bochte without discussion other than stating that "the consideration argument was the only one that would have had merit." A written order of judgment in favor of Kolber and against both Bochte and Fox for $16,828.88 was then entered without a recital of findings.

OPINION
 1, 2 It is undisputed that consideration is essential to the enforceability of an indemnity agreement. (See generally Nathan v. Leopold (1969), 108 Ill. App.2d 160, 167-70, 247 N.E.2d 4; Lauer v. Blustein.) Kolber adopts the position here, as he did at trial, that the consideration for Bochte's indemnity undertaking was the benefit to Fox running from Kolber's execution of the primary note to the Bank. We believe the circumstances disclose the existence of consideration between Kolber and Bochte whereby Kolber executed the primary note in reliance upon Bochte's promise of indemnification. Kolber's execution of the primary note to the Bank under these circumstances was a detriment to him, and was valid consideration capable of supporting the indemnification agreement. See Bredemann v. Vaughan Mfg. Co. (1963), 40 Ill. App.2d 232, 242, 188 N.E.2d 746; Williston, Contracts § 102A (3d ed. 1957); Restatement of Contracts §§ 75 and 76 (1932).
We agree that the record discloses sufficient consideration for Bochte's execution of the indemnity agreement. However, the trial court erred in refusing to permit Bochte to adduce evidence purporting to show Kolber's complicity in the alleged scheme to defraud the Bank.
 3-7 A presumption of intent to defraud a bank arises where a loan to an otherwise insolvent customer is secured through false pretenses. (Pharr v. United States (6th Cir.1931), 48 F.2d 767; see also United States v. Nystrom (W.D. Penn. 1953), 116 F. Supp. 771, aff'd (1956), 237 F.2d 218.)[1]*370 Willingness to repay a loan illegally procured through fraud does not negate the intent to defraud. (United States v. Braverman (7th Cir.1975), 522 F.2d 218, cert. denied (1975), 423 U.S. 985, 46 L.Ed.2d 302, 96 S.Ct. 392.) A contract designed to accomplish an unlawful purpose is illegal and void. (See generally Simmons v. Columbus Venetian Stevens Bldgs., Inc. (1958), 20 Ill. App.2d 1, 14, 155 N.E.2d 372; Ill. Rev. Stat. 1969, ch. 38, par. 17-1(a).) Where enforcement of an illegal contract is sought, the courts will aid neither party but will leave them where they have placed themselves, since the parties are in pari delicto and can recover nothing under the contract. (Wiegand v. Wiegand (1951), 410 Ill. 533, 103 N.E.2d 137.) Even where the illegality of the contract is not raised by the parties below, the court, sua sponte, has the power to consider the question when the facts indicate such circumstances. Lind v. Spannuth (1956), 9 Ill.2d 311, 316, 137 N.E.2d 360.
Bochte's amended answer to the third-party complaint alleged that Kolber and Fox acted in concert in misrepresenting the purpose of the loan to the Bank. In addition, Bochte in a motion for summary judgment alleged that Kolber acted in pari delicto with Fox and with Irwin A. Klopferd, the lending officer of the Bank, in misrepresenting to the Bank the true purpose of the loan. Kolber admitted at trial that his credit was to be used by Bochte and Fox to procure a loan of money from the Bank; and that the money as obtained was to be used by Bochte and Fox, whose credit Kolber knew was "over-extended." Kolber's execution of the loan application could therefore have been a significant step in furthering the scheme to procure money from the Bank under false pretenses. Evidence as to these allegations and Bochte's defense to the third-party complaint should have been received and considered. Since the record shows that the trial court did not permit evidence to fully consider the merits of the defense, the cause must be remanded for such purpose.
We have also considered Bochte's claim that Kolber's failure to raise the defense of forgery in the primary action released Bochte of any obligation under the indemnity agreement. That claim is without merit. Kolber admitted at the instant trial that his name was signed by others to the original proceeds check and to the subsequent renewal notes as part of the overall plan to do whatever necessary to accomplish the parties' purpose. A defense of forgery raised by Kolber in the original action would clearly have been without merit under such circumstances.
For the foregoing reasons the judgment of the circuit court of Cook *371 County in favor of third-party plaintiff Marshall Kolber and against third-party defendant William F. Bochte is reversed and the cause remanded with directions to receive and consider such relevant, competent and material evidence as the parties may present as to the question of pari delicto and for further proceedings not inconsistent with this opinion.
Judgment reversed and cause remanded with directions.
LORENZ and WILSON, JJ., concur.
NOTES
[1]  Although the instant indemnity agreement is dated September 23, 1970, the record does not indicate when application for the loan was made to the Bank. We therefore note the possible violation of Federal law which involves securing, by false statements, loans from national banks insured by the Federal Deposit Insurance Corporation. See 18 U.S.C. § 1014 (1970), as amended by Pub. L. 91-609, Title IX, § 915, 84 Stat. 1815, Dec. 31, 1970; see also 12 U.S.C. § 1814 (1970).
