
89 Cal.Rptr.2d 811 (1999)
75 Cal.App.4th 1406
BT-I, Plaintiff and Appellant,
v.
EQUITABLE LIFE ASSURANCE SOCIETY OF the UNITED STATES, Defendant and Respondent.
No. G020711.
Court of Appeal, Fourth District, Division Three.
October 29, 1999.
As Modified on Denial of Rehearing November 29, 1999.
Review Denied January 19, 2000.[**]
*813 Pinto & Dubia, Christian F. Dubia, Jr. and Lynnda A. McGlinn, Irvine, for Plaintiff and Appellant.
Morrison & Foerster, Irvine, Shirley M. Hufstedler, Richard D. Fybel, Irvine, A. Max Olson and Carole E. Reagan, Irvine, for Defendant and Respondent.
Certified for Partial Publication.[*]

OPINION
BEDSWORTH, J.
This is an appeal by a limited partner that was squeezed out of the partnership when the general partner purchased and foreclosed a deed of trust on the partnership's sole asset, an office building.
BT-I, the limited partner, brought this action against The Equitable Life Assurance Society of the United States (Equitable), the general partner, alleging breach of fiduciary duty, breach of contract (three causes of action) and breach of the covenant of good faith and fair dealing.[1] The trial judge sustained Equitable's demurrer without leave to amend and entered judgment for it on the complaint. He found the partnership agreement authorized Equitable's conduct and relieved it of any duty to BT-I, and Equitable was free to foreclose after it offered the loans to the partnership at its own cost and the partnership declined. He determined BT-I suffered no damages, first because it could not recover for tax liability imposed as a result of Equitable's purchase of the debt, and second because it had no equity in the building with more than $64 million in debt when the only offer received for it was for $39 million.
BT-I argues the limited partnership agreement could not abrogate Equitable's fiduciary duty not to engage in self-dealing. It further asserts that taxes incurred are a recoverable item of damages, and its equity in the lost building should be measured by the difference between the fair market value of the property and the amount Equitable paid for the debt. We agree the complaint was sufficient to state a cause of action, and reverse.

* * *
In 1985, BT-I (a California general partnership) entered into a general partnership with Equitable named Brin-Mar I, *814 to develop and operate a commercial office building and retail complex in Orange County.[2] Two phases were planned, first an office building and then a retail complex. Banque Paribas provided a $62.5 million loan secured by a trust deed on the project.
In 1991, BT-I and Equitable canceled their 1985 general partnership and entered into the present limited partnership, Brin-Mar I, L.P., with Equitable the general partner and BT-I the limited partner. Equitable had a 70 percent interest and BT-I had a 30 percent interest. Under an accompanying loan modification agreement, Banque Paribas agreed to the change, advanced additional funds secured by a second trust deed, and extended the maturity date of the first loan so that both were due on August 31, 1995. Equitable put up $6 million in additional capital and received in return sole title to the retail complex, along with extensive powers giving it the sole right to manage and control the partnership and its assets. It is one of these many powers that is at the crux of this appeal.
Paragraph 5.1(c) of the limited partnership agreement gave Equitable broad powers to refinance and restructure the partnership debt, "provided, however, that in no event shall the General Partner amend, modify, cancel or rescind the terms of the Existing Paribas Loan ... on or prior to August 31, 1995; and provided further, that in no event shall the General Partner be required to take any action (including, without limitation, contributing additional sums to the Partnership or otherwise expending any of its own funds) to prevent Banque Paribas or any other lender from exercising any remedies in connection with any loan made to the Partnership or otherwise related thereto."
As the due date of the Paribas loans approached, Equitable no longer wanted BT-I as a partner and maneuvered to oust it. Equitable learned the bank was interested in selling the loans at a steep discount, notified BT-I that the bank was soliciting bids, and suggested an offer of $35 million would succeed. Unknown to BT-I or other bidders, the bank had already agreed to sell the loans to Equitable if it matched the high bid, and further agreed not to deal directly with BT-I. BT-I alleged Equitable's proffer of the opportunity was a charade, since neither the partnership nor BT-I had the necessary funds.
Equitable bought the loans on August 21, 1995 for $38.5 million. On September 1, 1995, the day after the loans were due, Equitable demanded full payment of approximately $65 million within 10 days. On the 11th day, no payment having been received, Equitable recorded notices of default.
In October 1995, Equitable offered to sell the loan to the partnership at its own cost. The offer was not accepted. BT-I asked Equitable to attempt to refinance the project, but the general partner refused. It made no attempt to sell the building, nor did it consider filing for bankruptcy protection. BT-I's own attempts to locate a new lender came to naught, because Equitable refused to provide partnership balance sheets and other financial information when requested, and refused to give BT-I access to the partnership books and records. A foreclosure sale was scheduled for March 1996. Three days before the sale, BT-I made a $39 million cash offer for the project but Equitable turned it down, both as lender and on behalf of the partnership. Equitable then acquired the building at the foreclosure sale.
BT-I claimed $5 million in damages for: (1) the loss of its equity in the project; (2) the post-foreclosure loss of appreciation as *815 the building increased in value when market conditions improved; and (3) being forced to recognize a taxable gain in 1995 because Equitable bought the loans, when otherwise it would have been postponed to 1996 or later if a third party acquired the debt and foreclosed.[3]

I
BT-I contends the partnership agreement did not expressly authorize Equitable's purchase and forclosure of partnership debt, and we should not interpret it to allow such conduct because the fiduciary duties of loyalty and good faith cannot be waived. We agree.
Partnership is a fiduciary relationship, and partners are held to the standards and duties of a trustee in their dealings with each other. "Partners are trustees for each other, and in all proceedings connected with the conduct of the partnership every partner is bound to act in the highest good faith to his copartner and may not obtain any advantage over him in the partnership affairs by the slightest misrepresentation, concealment, threat or adverse pressure of any kind. [Citations.]" (Leff v. Gunter (1983) 33 Cal.3d 508, 514, 189 Cal.Rptr. 377, 658 P.2d 740, internal quotation marks omitted.) Moreover, this duty extends to all aspects of the relationship and all transactions between the partners. "Each [partner] occupie[s] the position of a trustee to the other with regard to all the partnership transactions, including the transactions contemplated by the firm and constituting the object or purpose for which the partnership was formed." (Ibid.)
In general, under the California Revised Limited Partnership Act (Corp.Code, § 15611 et seq.), partners may determine by agreement many aspects of their relationship. (Corp.Code, § 15618.) But there are limitations. A general partner of a limited partnership is subject to the same restrictions, and has the same liabilities to the partnership and other partners, as in a general partnership (Corp.Code, § 15643). One of these is the duty to account to the partnership for any benefit, and hold as trustee for it any profits, "derived ... without the consent of the other partners from any transaction connected with the ... conduct ... of the partnership...." (Corp.Code, former § 15021, repealed by Stats.1996, ch. 1003, § 1.2, eff. Jan. 1, 1999, italics added.)[4]
While there are no California cases dealing with the acquisition of partnership debt by a general partner, we agree with recent out-of-state decisions holding such conduct is a breach of fiduciary duty. (Thomas v. Schmelzer (App. 1990) 118 Idaho 353, 359-360, 796 P.2d 1026, 1032-1033; Ebest v. Bruce (Mo.App. 1987) 734 S.W.2d 915, 922; cf. Dean Operations, Inc. v. One Seventy Associates (1995) 257 Kan. 676, 689-692 [896 P.2d *816 1012, 1021-1022].) A general partner that acquires a partnership obligation cannot foreclose on partnership assets. (Dean Operations, Inc. v. One Seventy Associates, supra, 896 P.2d 1012.)
The question then becomes whether the fiduciary duty not to purchase partnership debt and foreclose out one's partner can be contracted away in the partnership agreement. We hold it cannot. In AB Group v. Wertin (1997) 59 Cal.App.4th 1022, 1037, 69 Cal.Rptr.2d 652, we noted other jurisdictions do not permit partners to waive fiduciary obligations that are fundamental to the relationship. We declined to apply the rule then because "transactions fundamentally unrelated to the partnership business" were involved, leaving "the basic partnership arrangement with its fiduciary character intact." (Ibid.) Now, we believe the appropriate time has arrived, because accepting Equitable's argument would strip away its fiduciary obligation in what was the partnership business.
We agree with several recent decisions holding a limited partnership agreement cannot relieve the general partner of its fiduciary duties in matters fundamentally related to the partnership business. (Konover Development Corporation v. Zeller (1994) 228 Conn. 206, 225-226, 635 A.2d 798, 808; Appletree Square I Limited Partnership v. Investmark, Inc. (Minn.App.1993) 494 N.W.2d 889, 893; Labovitz v. Dolan (1989) 189 Ill.App.3d 403, 412, 416-417, 136 Ill.Dec. 780, 545 N.E.2d 304, 310, 313; Wartski v. Bedford (1st Cir.1991) 926 F.2d 11, 20 [applying Massachusetts law].) Exactly where the line resides between those matters upon which partners may and may not reduce or eliminate their fiduciary duties is a question we need not decide, because Equitable's transgression is beyond all doubt on the wrong side of the line.
Labovitz v. Dolan, supra, 189 Ill.App.3d 403, 136 Ill.Dec. 780, 545 N.E.2d 304, is instructive. The court there held a general partner's sole discretion over certain decisions was nonetheless circumscribed by his fiduciary duty. Dolan was the general partner of a limited partnership formed to invest in cable television programming. The articles of partnership gave him "exclusive and complete discretion in the management and control of the business and affairs of the partnership." They further provided "Dolan in his sole discretion shall determine the availability of Cash Flow for distribution to the partners." The venture was so successful that the limited partners were required to report substantial personal income for tax purposes. Although the partnership had cash available to fund the partners' tax obligations, Dolan made only nominal distributions. The result was the limited partners had to pay taxes on income retained by the partnership from their own funds. They ended up cash-strapped, and Dolan bought them out for two-thirds of book value. (Id. at pp. 404-06, 136 Ill. Dec. 780, 545 N.E.2d at pp. 305-306.)
The Illinois court held the ousted limited partners stated a claim for breach of fiduciary duty. Rejecting the defense the partnership agreement allowed Dolan's squeeze-out, the court explained: "although the Articles clearly gave the general partner the sole discretion to distribute cash as he deemed appropriate, that discretion was encumbered by a supreme fiduciary duty of fairness, honesty, good faith and loyalty to his partners. Language in the agreement such as `sole discretion' does not metamorphose the document into an unrestricted license to engage in self-dealing at the expense of those to whom the managing partner owes such a duty." (Labovitz v. Dolan, supra, 189 Ill.App.3d at pp. 416-417, 136 Ill.Dec. 780, 545 N.E.2d at p. 313.)
Wartski v. Bedford, supra, 926 F.2d 11, involved self-dealing similar to the case at hand. Heinz Wartski, an electronic engineer, conceived the idea of a data collection device for motor vehicles and obtained a patent. He formed a partnership to exploit the device with Terence Bedford, a *817 manager with experience in the venture capital world. When the business fell upon financial difficulties, Bedford bought the invention and associated patents and technology for himself. Wartski sued for breach of fiduciary duty, and Bedford defended on the ground the partnership agreement allowed him to engage in other profit making activities "whether or not competitive with the business of the partnership." (Id. at p. 20.)
The court held the partnership agreement did not relieve Bedford of his fiduciary duty: "[i]t is at least debatable whether this language allows one partner to obtain for himself the exclusive right, title and interest to the patent rights to an invention and its technology which was the heart and soul of the partnership venture and the brainchild of the other partner. [¶] ... [M]ore importantly, even if the partnership agreement can be interpreted as [Bedford] claims, it cannot nullify the fiduciary duty owed by Bedford to the partnership. The fiduciary duty of partners is an integral part of the partnership agreement whether or not expressly set forth therein. It cannot be negated by the words of the partnership agreement." (Wartski v. Bedford supra, 926 F.2d at p. 20, italics added.) The same is true here.
We do not believe the partnership agreement can be read as permitting Equitable to purchase the loans for its own account and then foreclosure. Certainly, it does not expressly allow such conduct. Even if the language were broad enough to justify such an interpretation, we hold a partnership agreement cannot relieve a general partner of its fiduciary duties to a limited partner and the partnership where the purchase and foreclosure of partnership debt is involved.
Paragraph 5.1(c) provides Equitable did not have to contribute any more money to the partnership or otherwise take any action to prevent foreclosure by any lender. Fairly read, this absolves Equitable of the duty to act affirmatively to bail out the partnership from the consequences of default.[5] But Equitable's conduct in buying and foreclosing the loans went far beyond whatever safe harbor might be found in the partnership agreement. It is one thing simply to do nothing and suffer the consequences equally with all other partners. It is another to step out of the role of partner and into that of an aggressive (and apparently greedy) lender in the marketplace. Equitable admits no less with the argument that "[a] lender other than Equitable certainly would not have offered BT-I these accommodations [offering the loan to BT-I at its cost] and would have proceeded straight to foreclosure." Equitable was BT-I's partner, not its lender, and it lost sight of this most basic distinction in its haste to pounce upon the loan.
Nor can we agree with Equitable that the Revised Uniform Limited Partnership Act or other provisions in the partnership agreement justify what it did. It is true the act permits the parties to vary its effect (with certain exceptions not relevant here) (Corp.Code, § 15618), so they were free to change the rule that a limited partner has a right to vote on transactions in which the general partner has "an actual or potential conflict" of interest. (Corp. Code, § 15636, subd. (f)(1)(E).) This they did. The partnership agreement gave either party the right "to compete, directly or indirectly, with the business of the Partnership" (paragraph 5.4), and eliminated BT-I's right to approve various matters under Corporations Code section 15636 subdivision (f) (paragraph 10.2), including the transactions involving a conflict of interest.[6] But the fact that the act allows *818 the parties to structure many aspects of their relationship is not a license to freely engage in self-dealing  it remains our responsibility to delimit the outer boundaries of permissible conduct by a fiduciary. In view of the rule against waiving fundamental fiduciary duties, we cannot stretch these general provisions to include giving Equitable a free hand to act for its own self-interest. Equitable was still a fiduciary, and its conduct must be measured by fiduciary standards.
BT-I takes a somewhat confusing position regarding the consequences of the events following Equitable's purchase of the loans. It argues Equitable breached its duty to protect the building by refusing to look for a buyer, refinance or place the partnership in bankruptcy, and by purchasing the building at the foreclosure. However, this ignores the admitted safe harbor provision that Equitable did not have to act to prevent foreclosure.
Equitable claims it was free to proceed after it offered BT-I the chance to participate in the initial purchase and later, after suit was filed, the opportunity to pay its 30 percent pro rata share and have the partnership repurchase the loans. Not so. The business opportunity doctrine allows a partner or corporate officer to take advantage of a partnership or corporate opportunity if he first offers it to the entity (MacIsaac v. Pozzo (1947) 81 Cal. App.2d 278, 285, 183 P.2d 910), but we are not convinced it applies here. To accept Equitable's position would allow it to achieve indirectly what it could not accomplish outright in the partnership agreement. Either route would amount to sanctioning a waiver of the fiduciary duty not to purchase and foreclose partnership debt, and abrogate an obligation fundamental to the nature of the fiduciary relationship. This we refuse to do. Cases cited by Equitable are inapplicable. Dennis v. Gordon (1912) 163 Cal. 427, 435, 125 P. 1063 involved an outside business opportunity "in no wise adverse to the interests of the firm." In Rankin v. Frebank Co. (1975) 47 Cal.App.3d 75, 88, 121 Cal. Rptr. 348, the court held a corporate officer was free to acquire a note without offering it to the corporation because "there was no corporate opportunity."
Equitable is equally mistaken in suggesting its actions were authorized by Corporations Code section 15617, which states "a partner may lend money to and transact other business with the limited partnership and, subject to applicable law, has the same rights and obligations with respect thereto as a person who is not a partner." We cannot discern anything in the purpose of Corporations Code section 15617 that suggests an intent to affect a general partner's fiduciary duty to limited partners. Under the prior limited partnership rule, limited partners were prohibited from making secured loans to the partnership and any collateral received could be set aside as a fraud upon creditors. (Corp.Code, former § 15513, repealed by Stats.1983, ch. 1223, § 8, p. 4692, operative July 1, 1984.) Corporations Code section 15617 is identical to Uniform Limited Partnership Act (1976) section 107, which was enacted to remove the fraudulent conveyances prohibition from the limited partnership law and leave the question to the general fraudulent conveyances statute. (6 A Uniform Laws Annotated, Limited Partnership Act (1976), com. to § 107, p. 94.) This change hardly sanctions Equitable's self-dealing.

II-IV[***]
The judgment is reversed. Appellant is entitled to its costs on appeal.
CROSBY, Acting P.J., and SEYMOUR, J.,[] concur.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for publication with the exception of pails II, III and IV.
[**]   Kennard, J., and Brown, J., dissented.
[1]  An additional cause of action for an accounting and dissolution was dismissed with prejudice while this appeal was pending.
[2]  The facts are drawn from the allegations of the fourth amended complaint, which we must assume true for purposes of a demurrer. (Del E. Webb Corp. v. Structural Materials Co. (1981) 123 Cal.App.3d 593, 604, 176 Cal.Rptr. 824.)
[3]  The complaint does not articulate how BT-I calculated the gain, but the principle appears to be that a debtor which acquires its own debt is taxed on the unpaid amount of the obligation, and acquisition of debt by a majority partner is treated as acquisition by the partnership. Under the Internal Revenue Code, gross income includes "income from discharge of indebtedness." (26 U.S.C. § 61, subd. (a)(12).) For purposes of determining such income, the acquisition of indebtedness by enumerated "person[s] related" is treated as if acquired by the debtor. (26 U.S.C. § 108, subd. (e)(4).) A partnership and a person owning more than 50 percent of the capital or profit interest in the partnership are treated as so related. (26 U.S.C. § 707, subd. (b)(1)(A).)
[4]  To the extent general partnership law applies in this case, the parties' rights are governed by the Uniform Partnership Act, previously codified in Corporations Code section 15001 et. seq. The Uniform Partnership Act was repealed, effective January 1, 1999, Stats. 1996, ch. 1003, § 1.2), and replaced by the Uniform Partnership Act of 1994, Stats.1996, ch. 1003, § 2), codified in Corporations Code section 16100 et seq. The 1994 Act only applies to partnerships formed on or after January 1, 1999, or those electing to be governed by its provisions (Corp.Code, § 16111, subd. (a)), which is not the case here.
[5]  BT-I concedes Equitable had no obligation to prevent a third party from exercising its rights under the deeds of trust.
[6]  Other delegations of partnership authority to Equitable included BT-I's agreement it would have no voice in the management of the partnership (paragraph 5.2) and its consent to the general partner's doing any act it had the right or power to do under the agreement (paragraph 5.7).
[***]   See footnote *, ante.
[]   Judge of the Orange County Superior Court, assigned by the Chief Justice pursuant to article VI, section 6 of the California Constitution.
