PAYOFF, LOAN AND PLEDGE AGREEMENT

                  PAYOFF, LOAN AND PLEDGE AGREEMENT, dated April 13, 1995, by
and among Powerine Oil Company, a California corporation ("Powerine"), CEC,
Inc., a Delaware corporation ("CEC"), Castle Energy Corporation, a Delaware
corporation ("Castle"), Metallgesellschaft Corp., a Delaware corporation ("MG
Corp."), MG Refining and Marketing, Inc., a Delaware corporation ("MGRM"), and
MG Trade Finance Corp., a Delaware corporation ("MGTF") (the "Payoff
Agreement").

                  In accordance with the terms of the Amended and Restated Loan
Agreement dated as of October 1, 1993 between MGTF and Powerine (as amended by
the First Amendment, dated as of October 14, 1994, the "Loan Agreement"; terms
not otherwise defined herein having the meanings set forth in the Loan
Agreement), all Obligations under the Loan Agreement (the "Powerine
Obligations") continue to be due and payable in full and are unpaid as of the
date hereof; Schedule I attached hereto lists the Powerine Obligations
outstanding as of the date hereof;

                  In consideration of the covenants and actions of MG Corp.,
MGRM and MGTF set forth in this Payoff Agreement, Powerine will pay in full all
outstanding Powerine Obligations under the Loan Agreement and terminate and
withdraw any demand to setoff amounts due under the Loan Agreement pursuant to
Section 10.9 thereof. Upon payment in full of the Powerine Obligations, MGTF
will terminate (i) all Liens it or its assigns may hold in the assets and equity
interests of Powerine with respect to the Powerine Obligations, (ii) all
obligations of Powerine under its guaranty, and (iii) the guaranty obligations
of Castle and Indian Refining Limited Partnership with respect to the Powerine
Obligations;

                  Powerine and MGRM were parties to a certain Offtake Agreement,
dated as of October 1, 1993, between Powerine and MGRM (as amended by the
Amendment dated as of October 14, 1994, the "Offtake Agreement");

                  Powerine and MGRM are in dispute with respect to claims
arising under or in connection with the Offtake Agreement as described on
Schedule II(a) attached hereto (the "Disputed Claims") and are also reserving
their right to dispute certain invoice(s) as described on Schedule II(b)
attached hereto (the "Disputed Invoice(s)") and Powerine is reserving its right
to recoup certain amounts delivered to Texas Commerce Bank as described on
Schedule II(c) attached hereto (the "TCB Claims");







                  Powerine has asserted its rights to setoff the amounts of the
Disputed Claims. In return for this Agreement and other valuable consideration,
Powerine is rescinding its assertion of setoff, and each of the parties wish to
submit the Disputed Claims, and, if necessary, the Disputed Invoice(s) and TCB
Claims, to binding arbitration in accordance with the terms hereinafter set
forth;

                  CEC desires to receive and Powerine desires to assign outright
to CEC all right, title and interest Powerine has in and to the Disputed Claims
for at least $10,000,000 and Powerine desires to pay to MGTF the full amount of
the Powerine Obligations without offset for the amount of the Disputed Claims.
In addition, to the extent that the parties do not resolve issues relating to
the Disputed Invoice(s) and the TCB Claims by May 1, 1995, any unresolved issues
will be submitted to binding arbitration;

                  CEC is the holder of that certain promissory note, dated
October 14, 1994, in the principal amount of $10,000,000 made by MG Corp. and
payable to the order of Castle (the "Existing MG Note");

                  Metallgesellschaft AG ("MG AG") is a guarantor of the Existing
MG Note pursuant to that certain Guaranty, dated as of October 14, 1994,
executed by MG AG for the benefit of Castle (the "MG AG Guaranty");

                  MG Corp. wishes to make a loan to CEC in the principal amount
of $10,000,000, in consideration for, and subject to the conditions set forth,
in that certain promissory note of CEC dated the date hereof (the "CEC Note");

                  MG Corp. wishes to grant CEC certain rights of setoff against
the CEC Note and CEC wishes to grant to MG Corp. certain rights of setoff
against the Existing MG Note; and

                  The purpose of the parties hereto being to extinguish all
rights and obligations of the parties with respect to the Loan Agreement and the
Offtake Agreement except for the Disputed Claims, Disputed Invoice(s) and TCB
Claims and otherwise to extinguish all rights and obligations of the parties as
between them with respect to the business, affairs and financing of the Powerine
Refinery in Santa Fe Springs, California.

                  ACCORDINGLY, in consideration of the covenants and subject to
the conditions contained herein, the parties hereto hereby agree as follows, it
being the intent of the parties that all of the actions, payments and deliveries
provided for herein shall occur simultaneously upon the execution and delivery
hereof except as expressly otherwise provided:

                  1. Payoff and Termination of Loan Agreement. On the Effective
Date (as hereinafter defined in Section 12), Powerine shall pay to MGTF the
total sum as specified within Schedule III attached hereto in immediately

                                      -2-







available funds by wire transfer in full satisfaction of the Powerine
Obligations, whereupon the Loan Agreement shall terminate as of the date hereof
and all rights and obligations of all of the parties thereto under the Loan
Agreement, to the extent not already terminated, shall be terminated. Powerine
hereby agrees that Powerine's assertion of a right of setoff in that certain
letter, dated as of April 4, 1995 and attached hereto as Exhibit A, is hereby
unconditionally terminated and withdrawn, provided, however, that this shall not
in any manner affect the rights of MGRM (and MG Corp. as MGRM's assignee
thereof) or Powerine (and CEC as Powerine's assignee thereof) with respect to
the Disputed Claims.

                    2. Release of Liens. On the Effective Date, all liens and
security interests in and to all of Powerine's assets granted to (i) MGTF in
connection with the Loan Agreement and (ii) MGRM in connection with the Offtake
Agreement, some of which have been assigned to Union Bank of Switzerland, as
collateral agent, ("UBS"), will be deemed fully and finally released. As of the
Effective Date, MGTF and MGRM hereby agree, and hereby agree to cause UBS, as
secured party of record, to execute and deliver to Powerine appropriate UCC-3
termination statements, mortgage releases and any other instruments or documents
prepared by Powerine that Powerine reasonably requests in order to effect the
releases described herein of record.

                  3. Return of Collateral. On the Effective Date, MGTF shall,
and shall cause UBS to, forthwith deliver to Powerine:

                           (a) the Amended and Restated Secured Promissory Note,
         dated as of October 1, 1993, and the Allonge thereto, dated as of
         October 14, 1994, both of which are to be marked cancelled;

                           (b) Stock Certificate #2 representing 1,000 shares of
         common stock of Powerine Holding Corp. (together with its stock power);

                           (c) Stock Certificate #22 representing 3,330,885
         shares of common stock of Powerine Oil Company (together with its stock
         power);

                           (d) the Subordinated Offtake Note, dated October 1,
         1993, in the principal amount of the lesser of $120,000,000 and the
         outstanding balance of the Subordinated Offtake Debt (as defined in the
         Offtake Agreement) made by Powerine and payable to the order of MGRM.

                  4. Termination of Certain Guaranty Obligations. As of the
Effective Date, MGTF for itself and on behalf of its affiliates and assigns, if
any, releases (i) Castle for any and all obligations it may have with respect to
the Powerine Obligations pursuant to that certain Amended and Restated Guaranty,
dated as of October 14, 1994, of Castle for the benefit of MGTF, (ii) Indian
Refining Limited Partnership, an Illinois limited partnership ("IRLP"), for

                                      -3-







any and all obligations it may have with respect to the Powerine Obligations
pursuant to that certain Guaranty, dated as of October 14, 1994, of IRLP and
Powerine for the benefit of MGTF (the "Cross Guaranty"); and (iii) Powerine for
any and all obligations it may have under the Cross Guaranty. MGTF shall, and
shall cause its affiliates and assigns, if any, to, upon request of Castle or
IRLP, duly execute and deliver, or cause to be duly executed and delivered, such
further instruments and take and cause to be taken such further actions as may
be necessary or proper in the reasonable opinion of Castle, Powerine or IRLP to
carry out more effectually the provisions and purposes of this Section 4.

                  5. Submission to Arbitration; Powerine Award Amount. (a) MGTF
shall or shall, as provided in Section 12(iii)(e), instruct Texas Commerce Bank
to turn over and, if necessary, endorse or assign to Powerine all checks, sums,
cash or collections received on or after April 13, 1995, for deposit into Texas
Commerce Bank Account No. 00101438753, net of any such items which are returned
unpaid or uncollected for any reason, and bank charges related thereto. Powerine
shall repay to MGTF the amount of any such returned items and charges which are
not offset by subsequent collections. Any such amounts not turned over, endorsed
or assigned by MGTF to Powerine or not repaid by Powerine to MGTF constitute the
"the TCB Claims".

                           (b) As of the Effective Date, the parties agree to
         submit the Disputed Claims to arbitration in accordance with the Rules
         for Non-Administered Arbitration of Business Disputes and Commentary
         (Amended 1993) of the Center for Public Resources, Inc. (the "Rules")
         and use best efforts to bring such proceeding to a conclusion with
         reasonable speed. The parties further agree that the Disputed Claims
         shall be submitted to a sole arbitrator and that the parties shall
         faithfully observe the Rules and shall abide by and perform any award
         rendered by the arbitrator. The arbitration shall be governed by the
         United States Arbitration Act, 9 U.S.C. ss. 1- 16, and judgment upon
         the award may be entered by any court having jurisdiction thereof. In
         addition, if issues relating to the Disputed Invoice(s) and the TCB
         Claims have not been resolved by May 1, 1995, MGRM, MGTF, MG Corp.,
         Castle, Powerine, and CEC agree to also submit such unresolved claims,
         if any, relating to the Disputed Invoice(s) and/or the TCB Claims to
         the same arbitration proceedings in accordance with this Section 5.

                           (c) The amount of the Disputed Claims, and, if
         applicable, the Disputed Invoice(s) and/or the TCB Claims, shall be
         arbitrated in a proceeding before an arbitrator selected from a panel
         of neutrals (the "Panel") supplied by the Center for Public Resources,
         Inc. ("CPR") from its National Panel. Within seven days from the date
         the Panel is supplied to the parties, each party shall be permitted to
         strike any Panel member for cause. Any Panel member residing or with an
         office in New York, Pennsylvania, or Illinois shall automatically be
         stricken. If, within fourteen days from the date the Panel is supplied
         the parties cannot agree on an arbitrator from those names remaining
         after strikes, the parties shall rank their preferences and submit them
         to the CPR pursuant to its procedures. The CPR's selection of an
         arbitrator shall be binding upon the parties.

                                      -4-








                           (d) The arbitrator's fees shall be at his or her
         normal hourly rate, and the arbitrator shall be reimbursed for all
         reasonable out-of-pocket expenses. Each party shall pay 50% of the
         arbitrator's fees and expenses on a schedule to be agreed among the
         parties and the arbitrator. Except as provided in item 2 of Schedule
         II(a), each party shall bear its own costs of the arbitration.

                           (e) The arbitration hearing shall take place in the
         city where the arbitrator maintains his or her office unless the
         parties shall otherwise agree.

                           (f) The parties shall attempt to agree on all
         discovery and scheduling issues. In the event they cannot agree, their
         disputes shall be presented to the arbitrator, whose decision shall be
         final.

                           (g) The arbitrator's jurisdiction and authority shall
         be limited to deciding whether (i) any amount of the Disputed Claims is
         owed to Powerine, or CEC as assignee, or (ii) if necessary, whether any
         net amount of the Disputed Invoice(s) or TCB Claims, respectively, is
         owed to any party. The arbitrator shall decide that as to each of the
         Disputed Claims, each of the Disputed Invoice(s) and each of the TCB
         Claims, respectively, whether (i) the entire amount is owing, (ii) none
         of the amount is owing, or (iii) a specific amount less than than the
         entire amount is owing. The parties have already decided that, if any
         amount(s) of the Disputed Claims or, if necessary, Disputed Invoice(s)
         or TCB Claims, is owed to Powerine, CEC or Castle, in whole or in part,
         Powerine, CEC, or Castle shall seek payment first by a setoff to the
         amount due under the CEC Note, and second as a cash payment from MG
         Corp., MGTF or MGRM. The arbitrator shall have no jurisdiction (i) to
         review or alter this form of payment of the Powerine Award Amount, (ii)
         to increase the Powerine Award Amount with respect to item 1 of
         Schedule II(a) to an amount in excess of $10,700,000, or (iii) to
         increase the Powerine Award Amount with respect to the Disputed
         Invoice(s) or the TCB Claims to an amount in excess, in each case, of
         the amounts of the Disputed Invoice(s) and the TCB Claims,
         respectively.

                           (h) In reaching his or her decision, the arbitrator
         shall apply the substantive laws, and not the conflict-of-laws
         provisions, of the State of New York. The hearing shall be
         stenographically recorded. Subject to item 2 of Schedule II(a), each of
         the parties shall pay 50% of the stenographer's attendance fee, but
         each party shall bear its own costs of ordering any transcripts.
         Subject to item 2 of Schedule II(a), if the arbitrator requests a
         transcript, each of the parties shall pay 50% of the cost.

                           (i) The aggregate amount, if any, awarded to
         Powerine, CEC or Castle pursuant to the arbitration referred to in this
         Section, together with interest thereon accruing at a rate of 8% per
         annum from the date of this Payoff Agreement, is hereby referred to as
         the "Powerine Award Amount" and the date of the arbitration decision
         with respect to the Disputed Claims is hereby referred to as the
         "Arbitration Award Date".

                                      -5-







                  6. Assignment of Disputed Claims. On the Effective Date,
Powerine hereby assigns outright to CEC, for at least $10,000,000, all of
Powerine's right, title and interest in the Disputed Claims and the Powerine
Award Amount relating to the Disputed Claims.

                  7. Mutual Releases. On the Effective Date, the parties hereto
shall exchange absolute mutual releases in the form attached hereto as Exhibit B
(the "Releases").

                  8. The CEC Note. On the Effective Date, MG Corp. shall
advance, in immediately available funds by wire transfer, $10,000,000 to CEC as
a term loan, payable pursuant to the terms and conditions set forth in the CEC
Note attached hereto as Exhibit C and CEC shall execute and deliver the CEC Note
to MG Corp.

                  9. Amendment and Pledge of Existing MG Note. As collateral
security for the payment, performance and observance of the principal and
interest accrued under the CEC Note, on the Effective Date, (i) CEC, Castle, MG
Corp. and MGRM hereby agree to allonge the Existing MG Note with the Allonge
attached hereto as Exhibit D, and (ii) CEC shall grant a security interest in,
endorse, pledge, assign and deliver to MG Corp. (who shall, within five business
days, deliver the same to a collateral agent for MG Corp. with copies of the
applicable documents (which shall be reasonably satisfactory to Castle) to
Castle) the Existing MG Note and the MG AG Guaranty, and grant a security
interest to MG Corp. in all rights of CEC therein and all cash proceeds or
payments derived from either.

                  10. Setoff Against CEC Note; Payment of Amounts in Excess of
the CEC Note. (a) Each of MG Corp., MGRM, MGTF, Castle, CEC and Powerine consent
and agree that CEC, as the owner of all rights, title and interest of Powerine
in the Disputed Claims and, if necessary, the Disputed Invoice(s) and TCB
Claims, shall be deemed to have automatically on the Arbitration Award Date
setoff the amount of the Powerine Award Amount, if any, against amounts
outstanding under the CEC Note. Upon the automatic exercise of such setoff, the
obligation of MGRM, MGTF or MG Corp. to pay to Powerine, CEC or Castle the
Powerine Award Amount, if any, shall be deemed fulfilled up to the outstanding
amount of the CEC Note. Upon the effectuation of such setoff, CEC shall promptly
provide a written reconciliation to MG Corp. and MGRM of the setoff.

                           (b) Any amount of the Powerine Award Amount in excess
         of the CEC Note shall become a joint and several obligation of MGRM,
         MGTF and MG Corp. and shall be paid within five business days of the
         Arbitration Award Date.

                  11. Setoff Against the Existing MG Note. Each of MG Corp.,
MGRM, MGTF, Castle, CEC and Powerine consent and agree that MG Corp. shall be
deemed to have automatically on the Arbitration Award Date (which shall also be
the maturity date under the CEC Note) setoff against amounts outstanding under
the Existing MG Note the full amount due and owing under the CEC Note 

                                      -6-






(after taking into account the application of the setoff by CEC, if any, as set
forth in Section 10 hereof). Upon the automatic exercise of such setoff, the
obligation of CEC to pay to MG Corp amounts outstanding under the CEC Note shall
be deemed fulfilled in full and the principal amount outstanding under the
Existing MG Note shall be deemed to be the original principal amount thereunder
as reduced by the setoff applied pursuant to this Section 11. Upon the
effectuation of such setoff, MG Corp. shall promptly provide a written
reconciliation to CEC and Powerine of the setoff.

                  12. Additional Conditions. This Payoff Agreement shall become
effective on the date and time (the "Effective Date") that the following
conditions precedent have been fulfilled: (i) the parties hereto shall have
received the payments, documents and deliveries provided for in this Payoff
Agreement (other than those expressly provided to be paid or delivered at a
later time); (ii) MG Corp., MGRM and MGTF shall have received on or before the
date hereof the following, each (unless otherwise indicated) dated such date, in
form and substance satisfactory to MG Corp., MGRM and MGTF:

                  (a) Certified copies of the resolutions of the Board of
         Directors of each of Castle, CEC and Powerine approving the Payoff
         Agreement, the Releases, and, in the case of Castle and CEC, the CEC
         Note and Allonge, and certified copies of all documents evidencing
         other necessary corporate action and governmental approvals, if any,
         with respect to this Payoff Agreement, the Releases, and the CEC Note
         and Allonge;

                  (b) An opinion of counsel from Jenner & Block, special counsel
         to Castle, CEC and Powerine, with respect to the enforceability of this
         Payoff Agreement, the CEC Note, the Allonge, the Releases delivered
         herewith and certain other matters in the form attached hereto as
         Exhibit E; and

                  (c)  An acknowledgement by Wickland Oil Company to the
         transactions contemplated hereby;

                           (iii) Castle, Powerine and CEC shall have received on
or before the date hereof the following, each (unless otherwise indicated) dated
such date, in form and substance satisfactory to Castle, Powerine and CEC:

                  (a) Certified copies of the resolutions of the Board of
         Directors of each of MG Corp., MGRM and MGTF approving the Payoff
         Agreement, the Releases, and, in the case of MG Corp., the CEC Note and
         Allonge, and certified copies of all documents evidencing other
         necessary corporate action and governmental approvals, if any, with
         respect to this Payoff Agreement, the Releases, and the CEC Note and
         Allonge;

                                      -7-






                  (b) An opinion of counsel from Kaye, Scholer, Fierman, Hays &
         Handler, counsel to MG Corp., MGRM and MGTF, with respect to the
         enforceability of this Payoff Agreement, the Allonge, the Releases
         delivered herewith and certain other matters in the form attached
         hereto as Exhibit F;

                  (c) A consent by MG AG to the transactions contemplated herein
         and a reaffirmation of the MG AG Guaranty;

                  (d) A consent by UBS to the actions contemplated by Sections 2
         and 3 hereof; and

                  (e) Copy of a Letter directing Texas Commerce Bank to redirect
         proceeds from Account No. 00101438753 in the name of MGTF to an account
         in the name of Powerine.

                  13. Representations, Warranties and Covenants. Until the
occurrence of the Arbitration Award Date and the effectuation of the automatic
setoff herein, each of Castle, CEC and Powerine represents, warrants and
covenants that:

                  (a) the Existing MG Note is owned by CEC free and clear of all
claims, mortgages, pledges, liens, encumbrances and security interests of every
nature whatsoever, except in favor of MG Corp. pursuant to this Payoff
Agreement;

                  (b) neither Castle nor CEC will sell, transfer, assign or
pledge any right, title or interest in, or grant a security interest in, the
Existing MG Note or CEC Note to any person other than MG Corp.;

                  (c) CEC has not engaged, and will not engage, in any business
other than the holding of passive investment assets;

                  (d) CEC is not subject to any claims, mortgages, pledges,
liens, encumbrances, or security interests, other than the pledge herein on the
Existing MG Note, on or against any of its assets, and CEC will not grant or
permit any lien, security interest or other charge or other encumbrance upon or
with respect to any of its assets other than the pledge herein; after giving
effect to the transactions contemplated hereby, CEC has no creditors other than
MG Corp.

                  (e) each of Castle, CEC and Powerine is a corporation duly
organized, validly existing and in good standing under the laws of the
jurisdiction of its incorporation and has the corporate power and authority to
own its properties and to transact the business in which it is engaged;

                  (f) each of Castle, CEC and Powerine has the corporate power
and authority to execute and deliver, and to perform its obligations under, this

                                      -8-






Payoff Agreement, and has taken all necessary corporate action to authorize the
execution, delivery and performance of this Payoff Agreement;

                  (g) this Payoff Agreement constitutes the legal, valid and
binding obligation of each of Castle, CEC and Powerine, enforceable in
accordance with its terms;

                  (h) the execution, delivery and performance of this Payoff
Agreement will not violate any law or regulation, or any order or decree of any
court or governmental instrumentality, or any provision of the charter or
by-laws of, or any securities issued by, any of Castle, CEC or Powerine, and
will not conflict with, or result in the breach of, or constitute a default
under, any indenture, mortgage, deed of trust, agreement or other instrument to
which Castle, CEC or Powerine is a party or by which it is bound; and

                  (i) except for reporting requirements applicable to Castle
under the Securities Exchange Act of 1934, no consent of any other person
(including, without limitation, stockholders and creditors of any of Castle, CEC
or Powerine) and no consent, license, permit, approval or authorization of,
exemption by, notice or report to, or registration, filing or declaration with,
any governmental instrumentality is required in connection with the execution,
delivery, performance, validity or enforceability of this Payoff Agreement.

                  14. Representations, Warranties and Covenants. Until the
occurrence of the Arbitration Award Date and the effectuation of the automatic
setoff herein, each of MG Corp., MGTF and MGRM represents, warrants and
covenants that:

                  (a) after giving effect to the transactions contemplated
herein, the CEC Note is owned by MG Corp. free and clear of all claims,
mortgages, pledges, liens, encumbrances and security interests of every nature
whatsoever, except claims relating to setoff by CEC pursuant to this Payoff
Agreement;

                  (b) MG Corp. will not sell, transfer, assign or pledge any
right, title or interest in, or grant a security interest in, the Existing MG
Note or the CEC Note to any person, except that MG Corp. may pledge the CEC
Note, subject to the provisions of this Agreement, to the collateral trustee for
MG Corp.'s bank lenders;

                  (c) each of MG Corp., MGTF and MGRM is a corporation duly
organized, validly existing and in good standing under the laws of the
jurisdiction of its incorporation and has the corporate power and authority to
own its properties and to transact the business in which it is engaged;

                  (d) each of MG Corp., MGTF and MGRM has the corporate power
and authority to execute and deliver, and to perform its obligations under, this
Payoff Agreement, and has taken all necessary corporate action to authorize

                                      -9-






the execution, delivery and performance of this Payoff Agreement;

                  (e) MG AG is an Aktiengesellschaft duly organized, validly
existing and in good standing under the laws of the Federal Republic of Germany
with full corporate power and authority to execute and deliver its consent and
reaffirmation of the MG AG Guaranty. All corporate action necessary in order for
the consent and reaffirmation delivered hereunder to be valid and binding
agreements of MG AG, and enforceable against MG AG, has been taken by MG AG, and
the consent and reaffirmation constitute or will constitute valid and binding
obligations of MG AG, enforceable against MG AG in accordance with their
respective terms;

                  (f) this Payoff Agreement constitutes the legal, valid and
binding obligation of each of MG Corp., MGTF and MGRM, enforceable in accordance
with its terms;

                  (g) the execution, delivery and performance of this Payoff
Agreement will not violate any law or regulation, or any order or decree of any
court or governmental instrumentality, or any provision of the charter or
by-laws of, or any securities issued by, any of MG Corp., MGTF and MGRM, and
will not conflict with, or result in the breach of, or constitute a default
under, any indenture, mortgage, deed of trust, agreement or other instrument to
which MG Corp., MGTF and MGRM is a party or by which it is bound; and

                  (h) except for reporting requirements under the Securities
Exchange Act of 1934, no consent of any other person (including, without
limitation, stockholders and creditors of any of MG Corp., MGTF and MGRM) and no
consent, license, permit, approval or authorization of, exemption by, notice or
report to, or registration, filing or declaration with, any governmental
instrumentality is required in connection with the execution, delivery,
performance, validity or enforceability of this Payoff Agreement.

                  15. Further Assurances. (a) Each of Powerine, CEC and Castle
shall, upon request of MG Corp., MGTF or MGRM, duly execute and deliver, or
cause to be duly executed and delivered, such further instruments and take and
cause to be taken such further actions as may be necessary or proper in the
reasonable opinion of MG Corp., MGTF or MGRM to carry out more effectually the
provisions and purposes of this Payoff Agreement.

                  (b) Each of MG Corp. MGTF and MGRM shall, upon request of
Powerine, CEC or Castle duly execute and deliver, or cause to be duly executed
and delivered, such further instruments and take and cause to be taken such
further actions as may be necessary or proper in the reasonable opinion of
Powerine, CEC or Castle to carry out more effectually the provisions and
purposes of this Payoff Agreement.

                                      -10-






                  16. Return of Existing MG Note. Upon payment in full of all
amounts due under the CEC Note, CEC shall be entitled to the return of the
Existing MG Note (as the principal amount of such Existing MG Note may have been
reduced by the setoff rights set forth in Section 11 hereof) and such return
will be effectuated either by instructions to the collateral agent within five
Business Days or delivery of the CEC Note within five Business Days, provided,
however, that if the Existing MG Note is offset in full pursuant to Section 11,
MG Corp. will mark the Existing MG Note cancelled and retain it.

                  17. Notices. All notices and other communications to any party
hereunder shall be in writing and shall be personally delivered or sent by
certified mail, postage prepaid, return receipt requested, or by a reputable
courier delivery service or by prepaid telex or telecopy and shall be given to
the address or telex or telecopier number for such party set forth below such
party's signature to this Payoff Agreement, or to such other address or telex or
telecopier number as such party may hereafter specify by notice to the other
party. Each such notice or other communication shall be effective (a) if given
by telex or telecopier, when such telex or telecopy is transmitted to the telex
or telecopier number specified by this Section and the appropriate answerback or
confirmation is received, (b) if given by certified mail, 72 hours after such
communication is deposited with the post office, addressed as aforesaid or (c)
if given by any other means (including, without limitation, by courier), when
delivered at the address specified by this Section.

                  18. Amendments and Waivers. No amendment or waiver of any
provision of this Payoff Agreement shall in any event be effective unless the
same shall be in writing and signed by all parties hereto.

                  19. Survival. All representations and warranties made in this
Payoff Agreement and in any document or statement delivered pursuant hereto or
in connection herewith shall survive the execution and delivery of this Payoff
Agreement.

                  20. Governing Law. This Payoff Agreement and the rights and
obligations of each of Powerine, Castle, CEC, MG Corp., MGRM and MGTF hereunder
shall be construed in accordance with and governed by the law of the State of
New York (without giving effect to the conflict of law principles thereof).

                  21. Submission to Jurisdiction. (a) EXCEPT FOR THE ARBITRATION
PROCEDURE SET FORTH IN SECTION 5 HEREOF, ANY LEGAL ACTION OR PROCEEDING WITH
RESPECT TO THIS PAYOFF AGREEMENT MAY BE BROUGHT SOLELY IN THE COURTS OF THE
STATE OF NEW YORK, THE STATE OF CALIFORNIA OR OF THE UNITED STATES OF AMERICA
FOR THE SOUTHERN DISTRICT OF NEW YORK OR FOR THE CENTRAL DISTRICT OF CALIFORNIA,
AND, BY EXECUTION AND DELIVERY OF THIS PAYOFF AGREEMENT, EACH OF POWERINE,

                                      -11-






CEC, CASTLE, MG CORP., MGTF AND MGRM HEREBY ACCEPTS FOR THEMSELVES AND IN
RESPECT OF THEIR PROPERTIES, GENERALLY AND UNCONDITIONALLY, THE EXCLUSIVE
JURISDICTION OF THE AFORESAID COURTS. EACH OF POWERINE, CEC, CASTLE, MG CORP.,
MGTF AND MGRM HEREBY IRREVOCABLY WAIVE, IN CONNECTION WITH ANY SUCH ACTION OR
PROCEEDING, (I) TRIAL BY JURY, (II) ANY OBJECTION, INCLUDING, WITHOUT
LIMITATION, ANY OBJECTION TO THE LAYING OF VENUE OR BASED ON THE GROUNDS OF
FORUM NON CONVENIENS, WHICH IT MAY NOW OR HEREAFTER HAVE TO THE BRINGING OF ANY
SUCH ACTION OR PROCEEDING IN SUCH RESPECTIVE JURISDICTIONS AND (III) THE RIGHT
TO INTERPOSE ANY SETOFF, COUNTERCLAIM OR CROSS-CLAIM WHICH WOULD INTERFERE WITH
THE SETOFF PROCEDURE AS SET FORTH IN SECTIONS 10 AND 11.

                  (b) Each of the parties hereto irrevocably consents to the
service of process of any of the aforementioned courts in any such action or
proceeding by the mailing of copies thereof by certified mail, postage prepaid
at its address determined pursuant to Section 17 hereof.

                  22. Binding Effect. This Payoff Agreement shall be binding
upon and inure to the benefit of Powerine, CEC, Castle, MG Corp., MGTF and MGRM
and their respective successors and permitted assigns; none of the parties
hereto shall have the right to assign any of their respective rights or
obligations except as expressly provided or permitted herein.

                  23. Execution in Counterparts. This Payoff Agreement may be
executed in any number of counterparts and by the different parties hereto on
separate counterparts, each of which when so executed and delivered shall be
deemed an original and all of which shall together constitute one and the same
agreement.

                  24. Integration. This Payoff Agreement and the documents
delivered hereunder and herewith contain a final and complete integration of all
prior expressions by the parties hereto with respect to the subject matter
hereof and shall constitute the entire agreement among the parties hereto with
respect to the subject matter hereof, superseding all prior oral and written
understandings.

                  25. Captions. The captions of the sections of this Payoff
Agreement have been inserted for convenience only and shall not in any way
affect the meaning or construction of any provision of this Payoff Agreement.

                                      -12-






                  IN WITNESS WHEREOF, each of the parties hereto has caused this
Payoff Agreement to be duly executed by its respective officers duly authorized
as of the day and year first above written.

                                    POWERINE OIL COMPANY

                                    By:      /s/ Henry Del Castillo
                                             ----------------------------------
                                    Title:   Chief Financial Officer
                                             ---------------------------------
                                                12354 Lakeland Road
                                                Santa Fe Springs, CA 90670-9883
                                                Att'n: William S. Sudhaus
                                                Telefax: (310) 946-1615

                                     CEC, INC.

                                     By:     /s/ Joseph L. Castle II
                                             --------------------------------
                                     Title:  President
                                             ---------------------------------
                                                 c/o Duane, Morris & Heckscher
                                                 1201 Market Street, Suite 1500
                                                 Wilmington, DE 19801
                                                 Telefax: (302) 571-5560

                                     CASTLE ENERGY CORPORATION

                                     By:     /s/ Joseph L. Castle II
                                             ---------------------------------
                                     Title:  Chief Executive Officer
                                             ---------------------------------
                                                 One Matsonford Road
                                                 Radnor, PA 19087
                                                 Telefax: (610) 995-2477

                                      -13-





                           METALLGESELLSCHAFT CORP.

                           By:  /s/ Arthur G. Taylor
                                -----------------------------------------------
                           Title: Executive Vice President and General Counsel
                                  --------------------------------------------- 
                                            520 Madison Avenue
                                            New York, New York 10022
                                            Att'n: Arthur G. Taylor, Esq.
                                            Telefax: (212) 826-9042

                           MG TRADE FINANCE CORP.

                           By:  /s/ Andre Guenoun
                                ---------------------------------
                           Title: Vice President and Secretary
                                  ------------------------------- 
                                            520 Madison Avenue
                                            New York, New York 10022
                                            Att'n: Arthur G. Taylor, Esq.
                                            Telefax: (212) 826-9042

                           MG REFINING AND MARKETING, INC.

                           By:  /s/ Thomas A. McKeever
                                ---------------------------------------
                           Title: Chairman and Chief Executive Officer
                                  -------------------------------------
                                            520 Madison Avenue
                                            New York, New York 10022
                                            Att'n: Arthur G. Taylor, Esq.
                                            Telefax: (212) 826-9042

                                      -14-