
787 S.W.2d 38 (1990)
PHILIPP BROTHERS, INC., Petitioner,
v.
OIL COUNTRY SPECIALISTS, LTD., Respondent.
No. C-8191.
Supreme Court of Texas.
January 17, 1990.
Rehearing Overruled March 21, 1990.
*39 Stephen D. Susman, Parker C. Folse, III, Houston, for petitioner.
William E. Junell, Jr., Kay J. Hazelwood, Ileana M. Blanco, Houston, for respondent.

ON MOTION FOR REHEARING
PER CURIAM.
We grant the petitioner's and respondent's motions for rehearing. The order of this court of June 7, 1989, granting petitioner's application for writ of error is withdrawn as improvidently granted. The court's per curiam opinion and judgment of June 7, 1989 are withdrawn and the following is substituted.
This case involves, in part, the nature of fraud necessary to allow a trial court to enjoin the presentment of a letter of credit under section 5.114(b)(2) of the Texas Business and Commerce Code. Tex.Bus. & Com.Code Ann. § 5.114(b)(2) (Tex UCC) (Vernon Supp.1989). The dispute arose out of a consignment contract, in which Phibro agreed to place on consignment with OCS approximately $15 million worth of oil field casing pipe. Under the terms of the consignment agreement, OCS was obligated to pay Phibro a "restocking" fee at a rate of 10% per year on that portion of the pipe in inventory and on consignment in the event OCS terminated the consignment agreement or otherwise defaulted on the contract. To secure OCS's payment of the restocking fee, OCS caused Texas Commerce Bank to issue a $1,516,000 standby letter of credit. In order to collect the proceeds, the terms of the letter of credit required Phibro to present the following documents: (1) a sight draft drawn on Texas Commerce Bank, (2) Phibro's letter stating that OCS had failed to pay the restocking fee when owed; and (3) a copy of Phibro's invoice stating the amount due from OCS marked unpaid.
Contending that Phibro's entire inventory of pipes was virtually worthless, OCS sent Phibro a letter stating its intention to cancel the contract. Phibro demanded that OCS pay the 10% restocking fee under the contract. When OCS failed to pay Phibro the restocking fee, Phibro attempted to draw on the letter of credit. Claiming that Phibro's representations concerning the quality of their pipe amounted to fraud under section 5.114(b)(2) of the Texas Business and Commerce Code, OCS filed suit to, among other things, enjoin Phibro from presentment, and Texas Commerce Bank from honoring the standby letter of credit. After a preliminary hearing, the trial court temporarily enjoined presentment of the letter of credit. The temporary injunction was affirmed by the court of appeals. Philipp Bros., Inc. v. Oil Country Specialists, Ltd., 709 S.W.2d 262 (Tex.App.Houston [1st Dist.] 1986, writ dism'd w.o.j.).
OCS continued to prosecute its claims against Phibro for breach of contract, negligent misrepresentation, fraudulent inducement and to permanently enjoin Phibro from presentment of the letter of credit. Phibro counterclaimed for breach of contract and bad faith termination. The trial court entered judgment that OCS take nothing from Phibro and also entered a monetary judgment for Phibro on its counterclaims. *40 Because the jury failed to find that Phibro had acted fraudulently, the trial court dissolved the injunction against the presentment of the letter of credit. Subsequently, Phibro complied with the terms for payment of the letter of credit and collected the proceeds.
The court of appeals held, among other things, that Phibro was not entitled to recover against OCS for breach of contract because Phibro's own breach of contract excused OCS's performance. The court of appeals further held that because OCS was not liable to Phibro for breach of contract, Phibro had no right to payment under the letter of credit issued by Texas Commerce Bank. Accordingly, the court reversed the judgment in favor of Phibro, rendered judgment that Phibro take nothing against OCS, and remanded the cause to the trial court for judgment in favor of OCS against Phibro for the amount determined to have been collected by Phibro on the letter of credit, and for other proceedings. 762 S.W.2d 170.
In denying the applications for writ of error, a majority of the court disapproves that portion of the court of appeals opinion, wherein the court held:
Because Phibro's right to present the letter of credit depended upon a truthful statement that OCS had failed to pay the restocking fee when owed, Phibro could not properly present the letter of credit without destroying the legitimate purposes of the instrument. Philipp Bros. Inc. v. Oil Country Specialists Ltd., 709 S.W.2d at 264. The court therefore erred in lifting the injunction against the letter's presentment.
762 S.W.2d at 179. This language in the court of appeals opinion improperly implies that a trial court can enjoin presentment of a letter of credit merely upon a showing that the letter of credit beneficiary's actions excused the credit account party from its underlying contractual liability.
A letter of credit transaction typically involves three separate contracts: (1) an underlying contract for which the letter of credit secures payment; (2) a contract between the issuing bank and the party seeking issuance of the letter of credit; and, (3) a contract between the issuing bank and the letter of credit beneficiary. See Republic Nat'l Bank of Dallas v. Northwest Nat'l Bank of Fort Worth, 578 S.W.2d 109, 112 (Tex.1979). A bank that issues a letter of credit, however, acts as a principal, not as an agent of the credit account party, and it engages its own credit. Tex.Bus. & Com.Code Ann. § 5.117 comment (Vernon 1968). Thus, upon issuing a letter of credit, a bank assumes a primary obligation independent of the underlying contract and agrees that it will pay upon presentment of documents required by the instrument. Tex.Bus. & Com.Code Ann. § 5.114(a) comment 1 (Vernon 1968); Republic Nat'l Bank of Dallas, 578 S.W.2d at 114. This principle is known as the independence doctrine and is designed to protect the commercial vitality of letters of credit. See Paris Sav. & Loan Ass'n v. Walden, 730 S.W.2d 355 (Tex. App.Dallas 1987, writ dism'd.). Presentment may not be enjoined unless there is a showing by the account party of fraud by the beneficiary. Tex.Bus. & Com.Code Ann. § 5.114(b)(2) (Vernon Supp.1989). The nature of the fraud defined under the terms of section 5.114(b)(2) has been correctly described as:
The situation of fraud in which the wrong doing of the beneficiary has so vitiated the entire transaction that the legitimate purposes of the independence of the issuer's obligation would no longer be served.
GATX Leasing Corp. v. DBM Drilling Corp., 657 S.W.2d 178, 182 (Tex.App.San Antonio 1983, no writ) (quoting Intraworld Industries, Inc. v. Girard Trust Bank, 461 Pa. 343, 336 A.2d 316, 324-25 (1975)).
The standard suggested by the court of appeals in the language quoted above is incorrect. That language implies that a trial court can enjoin presentment of a letter of credit merely upon a showing that the letter of credit beneficiary's compliance with the terms of payment of the letter of credit contained statements which were not truthful. To maintain the strong commercial viability of letters of credit, *41 presentment should not be enjoined because the beneficiary's compliance with the terms of payment under the letter of credit contains untrue statements unless those statements also constitute fraud under section 5.114(b)(2).
The applications for writ of error of Phibro and OCS are denied.
