
93 N.Y.2d 296 (1999)
712 N.E.2d 656
690 N.Y.S.2d 489
CHEMICAL BANK, Respondent,
v.
BRUCE G. MELTZER, Appellant, et al., Defendant.
Court of Appeals of the State of New York.
Argued March 30, 1999.
Decided May 4, 1999.
*297 Cahn Wishod & Lamb, L. L. P., Melville (Joel M. Markowitz of counsel), for appellant.
*298 Mark E. Segall, New York City, and Caroline A. Mellusi for respondent.
Chief Judge KAYE and Judges BELLACOSA, SMITH, LEVINE, CIPARICK and ROSENBLATT concur.


*299 OPINION OF THE COURT
WESLEY, J.
This appeal highlights the innovative and complex financing strategies used by local government officials to attract corporations to their municipalities and to stimulate economic development. We are asked to dust off the venerable law of suretyship, guaranty and subrogation and to reexamine these principles within the context of a multifaceted, contemporary business transaction which involves several parties, sophisticated financing arrangements and a variety of legal obligations.
In 1984 Major Building Products Wholesalers, Inc. sought to acquire land to construct a new facility for its business. In an effort to assist Major Building with this venture and to encourage the company to construct the facility within the Town of Brookhaven, the Town's Industrial Development Agency (IDA) offered the company favorable financing arrangements and tax incentives.[1] The IDA issued a nonrecourse Industrial Development Revenue Bond in the amount of $1.1 million in December 1984. Pursuant to the terms of the bond purchase agreement, the IDA sold the bond to Manufacturers Hanover Trust Company, which subsequently merged with plaintiff Chemical Bank (Bank). As security for payment of all sums due the Bank under the bond purchase agreement, the IDA granted the Bank a first mortgage on the property and facility.
At the time the bond was issued, the IDA took title to the facility in its own name, and a lease between Major Building (as *300 tenant) and the IDA (as landlord) was executed. The IDA then pledged and assigned the lease to the Bank as additional security on the bond. According to the terms of the lease Major Building was entitled to occupy the facility for a term of 15 years. Additionally, the bond proceeds were to be used to acquire equipment and/or renovate the facility. Major Building also agreed to remit rent directly to the Bank, rather than to the IDA, in amounts equal to the monthly debt service on the bond. Thus, under the terms of the entire transaction, Major Building's rent payments were to be used to make the installment payments of principal and interest under the bond until fully paid, at which time Major Building would purchase the facility for $1.
A guaranty also was executed by Major Building, its principal (General Building Products Corporation) and defendant Meltzer, president of Major Building. The guarantors jointly and severally agreed to guarantee payment of the bond in the event of an IDA default. The guaranty states that "upon any default * * * in the payment when due, of the principal of, any premium on, or interest on the Bond or of any sum payable * * * under the Bond Purchase Agreement, the Mortgage or the Assignment, [Meltzer] will promptly pay the same" and that he and the other signatories of the guaranty were "jointly and severally, absolutely, irrevocably and unconditionally" liable to the Bank for all payments due under this financing arrangement, "each as a primary obligor and not merely as a surety."
On April 16, 1991 the Bank extended additional credit to Major Building via the IDA and took a $2 million second mortgage on the property in order to settle a debt Major Building owed to another bank. This mortgage recited that it was "subject and subordinate to the lien of an existing first mortgage dated December 1, 1984 made by the [IDA] to the [Bank] in the original principal sum of $1,100,000.00." The second mortgage was executed by the IDA as mortgagor, accepted by the Bank as mortgagee, and approved by Major Building as "the lessee of the [mortgaged] premises." Meltzer did not guarantee payment under the second loan in any capacity. He did not sign any other writing in connection with the second mortgage, nor did he participate in this transaction.
Between January 1985 and January 1993, Major Building paid all sums due under the 1984 IDA financing scheme. In 1993, however, the company defaulted on its lease payments to the IDA. Given that these payments were specifically earmarked *301 to service the debt on the bond, the IDA subsequently defaulted on the bond. The Bank then sought to enforce the guaranty to secure payment. General Building defaulted on the guaranty by seeking bankruptcy protection, leaving Major Building and Meltzer as the only collection possibilities under the guaranty.
After the Bank unsuccessfully demanded payment from Meltzer and Major Building it filed a motion against them on the guaranty for summary judgment in lieu of complaint pursuant to CPLR 3213. The Bank sought $337,756 in principal, $59,698.37 in interest through July 29, 1995, interest computed at prime rate from July 29, 1995 to entry of judgment, and attorneys' fees.
Meltzer then offered to tender the full amount due under the bond, on the condition that he be subrogated to the Bank's rights as a creditor under the 1984 bond purchase agreement. He asked that the first mortgage, given as security for the 1984 loan, be assigned to him. The Bank refused, but indicated that it would instead supply a satisfaction of the mortgage pursuant to Real Property Law § 275.[2] Meltzer declined the proposal and cross-moved to compel the Bank to honor his common-law right as subrogee by assigning the bond and first mortgage to him conditioned upon his payment of all sums due. Major Building did not appear.
Supreme Court granted the Bank's motion, denied Meltzer's motion, directed entry of judgment in favor of the Bank, and severed plaintiff's claim for attorneys' fees, referring that issue to a Referee. The court concluded that Meltzer was a guarantor and not a surety and therefore was not entitled to assignment of the Bank's mortgage rights. The court also noted that assignment of the first mortgage would be inequitable, as it would defeat the purpose of the guaranty and would impair the Bank's second mortgage if Meltzer foreclosed. An additional judgment was entered later disposing of the claim for attorneys' fees.
The Appellate Division, with one Justice dissenting, affirmed (245 AD2d 214). The majority concluded that Meltzer's payment did not entitle him to subrogation of the first mortgage because he was not a surety. Rather, the Appellate Division determined that since the guaranty signed by Meltzer did not *302 distinguish among the three guarantors in the transaction and stated that they are "`jointly and severally, absolutely, irrevocably and unconditionally'" primary obligors, his status as a surety was "simply not supported by the [guaranty that he] signed" (id., at 215). Thus, the Court concluded, Meltzer did not have subrogation rights.
Presiding Justice Murphy dissented. He concluded that Meltzer was "cast as a surety in the 1984 financing transaction" (id., at 216). He noted that Major Building, not Meltzer, was the primary beneficiary of the 1984 transaction and that Major Building had primary responsibility to service the debt through the lease. Justice Murphy reasoned that because Meltzer was really only obligated to pay in the event Major Building defaulted, Meltzer was answering for the debt owed principally by anotherthe usual role of a surety. According to Justice Murphy, Meltzer should not be denied the recourse ordinarily available to a surety, including subrogation rights and assignment of the mortgage. We granted leave to appeal and agree with Justice Murphy. The Appellate Division order therefore should be reversed.
A suretyship arrangement is, at its core, the confluence of three distinct, yet interrelated, obligations. These obligations are embodied in the tripartite relationship of principal obligor and obligee; obligee and secondary obligor; and secondary obligor and principal obligor. When a secondary obligor is bound to pay for the debt or answer for the default of the principal obligor to the obligee, the secondary obligor is said to have suretyship status (see, General Phoenix Corp. v Cabot, 300 NY 87, 92). In other words, in transactions giving rise to suretyship status, the secondary obligor is answerable to the obligee in some way with respect to a duty, the cost of which, as between the principal obligor and the secondary obligor, ought to be borne by the principal obligor (Restatement [Third] of Suretyship and Guaranty § 1, comment b). While commercial transactions have evolved over the years, these principles remain at the core of suretyship doctrine.
In order to determine Meltzer's status, we must first look to the substance of the entire transaction, rather than its form (Restatement [Third] of Suretyship and Guaranty § 1 [3] [a]). As this Court stated half a century ago, "a contract of suretyship does not depend upon the use of technical words but upon a clear intent that one party as surety [is bound] to the second party as creditor to pay a debt contracted by a third party, either immediately upon default of the third party or after attempts *303 to effect collection from the third party have failed" (General Phoenix Corp. v Cabot, supra, at 92 [emphasis added]). The existence of suretyship status depends upon the respective roles of the parties and the nature of the underlying transaction.
When the guaranty is read in conjunction with the bond purchase agreement, lease, assignment and mortgageeach is incorporated into the guaranty by specific referenceit is clear that Meltzer has suretyship status. Viewing the entire transaction as an integrated business deal, Major Building's lease payments were the conduit for financing the nonrecourse bond. The lease provisions provide that Major Building was obligated to make its payments directly to the Bank. Additionally, Major Building agreed to make all late payment penalties and interest charges on the bond. Moreover, the company unconditionally obligated itself to make these payments notwithstanding any defenses or claims it might have against the IDA. Thus, given the way in which this transaction was structured, any default by Major Building on its lease payments directly translated into an IDA default on the bond.
Here, as the primary obligor to Chemical Bank, Major Building bore the responsibilities for the bond payments and also reaped the lion's share of the benefits. Notably, Meltzer was not a party to the lease and it did not impose any responsibilities on him. He was never called upon to pay anything on the bond until Major Building defaulted, nor did he receive any direct benefit from the transaction. He was required to pay the debt only after Major Building's defaultthe hallmark of a suretyship arrangement. Meltzer therefore bore the risks associated with a classic surety (Restatement [Third] of Suretyship and Guaranty § 1 [3]).
In reaching the conclusion that Meltzer was not a surety, the lower courts erroneously relied on the contradictory language of one instrumentthe guaranty. While it is true that a court may not rewrite clear and unambiguous contracts, the guaranty here is replete with inconsistencies. The express language of the guaranty does identify the guarantors as "primary obligors" to the Bank on the bond, and "not merely sureties." The document itself, however, is a guaranty, and those bound by the instrument are referred to as "guarantors." These references are confounded by the fact that both guarantors and sureties can be afforded suretyship status as long as the fundamental nature of this status is present and the core criteria of a suretyship are fulfilled (Restatement [Third] of Suretyship and Guaranty § 1, comment c).
*304 Moreover, contrary to the lower courts' focus on a few words of a single instrument, this transaction must be analyzed as an integrated whole. To adopt the approach employed by the lower courts would elevate form over substance, obfuscate the nature of Meltzer's legal obligations and gloss over the essential character of this transaction.
As a surety, Meltzer is entitled to the rights that accompany his standing, including the right of subrogation. Rooted in equity, the purpose of the subrogation doctrine is to afford a person who pays a debt that is owed primarily by someone else every opportunity to be reimbursed in full. Ordinarily, in situations involving a party with suretyship status, "the surety upon payment of the debt is entitled, not only to an assignment or effectual transfer of all such additional collaterals taken and held by the creditor, but also to an assignment or effectual transfer of the debt and of the bond or other instrument evidencing the debt" (Ellsworth v Lockwood, 42 NY 89, 98; see also, Restatement [Third] of Suretyship and Guaranty §§ 18, 27-31). A surety's right of subrogation attaches at the time the surety pledges its obligation to the creditor, and the surety is entitled to insist upon priority to the proceeds of the collateral (National Exch. Bank v Silliman, 65 NY 475, 479; see also, United States Fid. & Guar. Co. v Triborough Bridge Auth., 297 NY 31, 36 ["The equity in favor of the surety * * * arose at the time of the giving of its bond. The right became available when the surety * * * completed that work at a loss"]).
Pursuant to these traditional common-law principles, Meltzer has the right to be subrogated to the Bank under the bond and mortgage; this right attached upon his execution of the guaranty. The fact that Meltzer was not a party to the transaction giving rise to the second mortgage in no way deprives him of his subrogation rights with regard to the first transaction (see, National Sav. Bank v Fermac Corp., 241 App Div 204, affd without opn 266 NY 443).
Here, Chemical Bank negotiated a second loan and mortgage on the same premises six years after the first transaction. The second transaction had nothing to do with the lease for which Meltzer stands as surety; he was not a party to it. When it entered into the second transaction, the Bank, a sophisticated creditor, was well aware of the nature of Meltzer's guaranty and thus was aware of Meltzer's already established priority right of subrogation. If the Bank saw fit to place itself in that position, then it must be bound by the legal effects of that decision. *305 Meltzer is entitled to his full subrogation rights. To rule otherwise would place the Bank in a better position vis-à-vis Meltzer despite its failure to consolidate the second loan into the first mortgage or to obtain Meltzer's guaranty of the later debt.
The Bank erroneously relies on American Sur. Co. v Palmer (240 NY 63) to argue that even if Meltzer is a surety, his tender of payment was ineffectual. While American Sur. does discuss when the right of subrogation becomes enforceable, it does not support the Bank's position that Meltzer's tender was insufficient to establish his right to demand an assignment of the mortgage upon payment. By filing a motion to compel assignment, Meltzer is simply seeking to protect the legal interest that will become his when he satisfies the first mortgage. Meltzer's tender was not conditioned on any new term or obligation; he seeks only those rights to which performance of his surety obligation entitles himsubrogation of the Bank's position on the first mortgage.
The Bank also argues the Restatement supports the position of the lower courts that allowing Meltzer the right of subrogation on the first mortgage would inequitably impair the Bank's position on the second mortgage. Contrary to the Bank's misleading arguments, this case does not involve a single mortgage securing two separate debts, with Meltzer having surety status with regard to only one of the obligations (see, Restatement of Security § 141, illustration 10).[3] Meltzer's surety status, and its concomitant rights of subrogation, is not being used to defeat the superior position of a second debt not covered by Meltzer's surety obligation.
In sum, we know of no case in which (and can think of no reason why) the essential nature of this commercial transaction must be altered and a liability enforced against Meltzer without giving him the benefit of his suretyship status. To rule otherwise would conflict with the spirit of the contract, violate the manifest intention of the parties and mask the true nature of the obligations and relationships that form the basis of this transaction.
Accordingly, the order of the Appellate Division, insofar as appealed from, should be reversed, with costs, and defendant *306 Meltzer's cross motion to compel assignment of the subject bond and mortgage should be granted.
Order, insofar as appealed from, reversed, etc.
NOTES
[1]  The Town IDA is authorized to provide these incentives pursuant to the New York State Industrial Development Agency Act (General Municipal Law art 18-A). The purposes of this Act are to promote economic welfare and attract economically sound investment and industry (General Municipal Law § 852). IDAs have myriad powers, including the power to issue bonds or notes for a project and to make contracts and leases (General Municipal Law § 856).
[2]  Although the Bank relied on Real Property Law § 275 to support its position in the lower courts, it did not raise the statute as a basis for an affirmance in its arguments to this Court.
[3]  This illustration relied upon by the Bank states: "P owes C $3000 and $2000. S is surety for only the $3000 obligation. P has given C a mortgage securing both debts. P defaults, and S pays C $3000. S is not subrogated to the mortgage until C has realized $2000 out of it."
