<PAGE>   1
                                                                  EXHIBIT 10.26





                             AMENDMENT NUMBER FOUR
                                      AND
                               WAIVER AND CONSENT
                                       TO
                          LOAN AND SECURITY AGREEMENT

         This AMENDMENT NUMBER FOUR AND WAIVER AND CONSENT TO LOAN AND SECURITY
AGREEMENT (this "Amendment, Consent and Waiver") is entered into as of October
24, 2000, among DEVX ENERGY, INC., formerly known as Queen Sand Resources,
Inc., a corporation formed under the laws of the State of Delaware ("DEVX");
DEVX ENERGY, INC., formerly known as Queen Sand Resources, Inc., a corporation
formed under the laws of the State of Nevada (the "Borrower"); each of the
lenders that is a signatory hereto (individually, a "Lender" and, collectively,
the "Lenders"); FOOTHILL CAPITAL CORPORATION, as administrative agent for the
Lenders (in such capacity, the "Administrative Agent"); and ABLECO FINANCE LLC,
as collateral agent for the Lenders (in such capacity, the "Collateral Agent"),
with reference to the following facts:

         A.       DEVX, Borrower, the Lenders signatory thereto, Administrative
                  Agent and Collateral Agent, heretofore have entered into that
                  certain Amended and Restated Credit Agreement, dated as of
                  October 22, 1999, as amended by that certain Amendment Number
                  One to Loan and Security Agreement dated as of May 23, 2000,
                  as further amended by that certain Amendment Number Two to
                  Loan and Security Agreement dated as of June 21, 2000, and as
                  further amended by that certain Amendment Number Three to
                  Amended and Restated Credit Agreement dated as of September
                  19, 2000 (as heretofore amended, supplemented, or otherwise
                  modified, the "Agreement");

         B.       DEVX has entered into the Recapitalization Agreement (as
                  defined herein) with the holders of DEVX's Series A preferred
                  stock, Series C preferred stock and common stock repricing
                  rights in which these holders have agreed to exchange all
                  their current holdings of DEVX equity for 732,500 shares of
                  DEVX common stock after giving effect to a 156 to 1 reverse
                  split (the "Share Exchange"). The Recapitalization Agreement
                  is subject to, among other things, (i) DEVX completing an
                  Equity Offering generating net proceeds to DEVX of not less
                  than $50 million on or before October 31, 2000 and (ii) DEVX
                  repurchasing at least $75 million of original principal
                  amount of its Senior Notes. DEVX intends to use a portion of
                  the proceeds of the Equity Offering to finance the repurchase
                  of the Senior Notes.

         C.       The Share Exchange and Equity Offering contemplated by the
                  Recapitalization Agreement may, upon implementation, each
                  constitute a Change of Control as defined under Article I,
                  Section 1.02 of the Agreement. Article IX, Section 9.21 of
                  the Agreement prohibits the repayment of the principal
                  portion of the Senior Notes.

         D.       Accordingly, DEVX and the Borrower have requested that the
                  Lenders (i) waive any non-compliance with the terms and
                  provisions of the Agreement as a result of the repurchase of
                  the Senior Notes from the proceeds of the Equity Offering and
                  the implementation of the Share Exchange as contemplated by
                  the Recapitalization Agreement, (ii) amend the definition in
                  the Agreement of the term Change of Control to permit
                  implementation of the Share Exchange and the Equity Offering
                  as contemplated by the Recapitalization Agreement without
                  triggering

<PAGE>   2





                  a default under the Agreement, (iii) acknowledge and agree
                  that the amounts received by DEVX under the Equity Offering
                  contemplated by the Recapitalization Agreement will be
                  applied first to the repurchase of the Senior Notes and
                  second to the prepayment of any of the Loans or other amounts
                  payable under the Agreement (provided that (i) no reduction
                  in the Aggregate Commitments shall result solely from any of
                  the foregoing events and transactions, and (ii) any such
                  prepayment of Loans may be reborrowed during the Revolving
                  Credit Period subject to the then effective Aggregate
                  Commitments in accordance with Section 2.07(d) of the
                  Agreement), and (iv) waive any non-compliance with the terms
                  of the Loan Documents as a result of certain corporate name
                  changes of the Obligors as more particularly described
                  herein.

         E.       The Lenders are willing to consent to such requests subject
                  to the terms and conditions set forth herein.

                  NOW, THEREFORE, in consideration of the above recitals and
the mutual premises contained herein, the Lenders signatory hereto, the
Administrative Agent, the Collateral Agent, DEVX and Borrower hereby agree as
follows:

                  1.       Definitions for this Amendment.

                  Any and all initially capitalized terms used herein shall
have the meanings ascribed thereto in the Agreement, as amended hereby. For
purposes of this Amendment, Consent and Waiver only, the following initially
capitalized terms shall have the following meanings:

                  "Share Exchange" has the meaning set forth in Recital B
hereof.

                  2.       Amendments to the Agreement.

                           a.       The following is added to Section 1.02 of
                           the Agreement between the terms Rating Agencies and
                           Reference Bank.

                                    "Recapitalization Agreement" shall mean the
                                    agreement dated as of July 17, 2000 and
                                    entered into by and among QSRD and Joint
                                    Energy Development Investments Limited
                                    Partnership, Marshall Capital Management,
                                    Inc. (fka as "Proprietary Convertible
                                    Investment Group, Inc."), Stark
                                    International, Shepherd Investments
                                    International, Ltd., Westover Investments
                                    L.P., Montrose Investments L.P., Palisades
                                    Capital, Inc., JNC Opportunity Fund Ltd.,
                                    Diversified Strategies Fund L.P., KA
                                    Investments, LDC, Sovereign Partners, L.P.,
                                    Advantage (Bermuda) Fund, Ltd., Canadian
                                    Advantage, L.P., and Dominion Capital Fund
                                    Ltd., in the form of Exhibit RA-1 attached
                                    hereto.

                           b.       The Definition of Change of Control in
                           Section 1.02 of the Agreement is amended by
                           inserting, immediately after subparagraph (c)
                           thereof the following proviso:



                                       2
<PAGE>   3



                                            "; provided that no Change of
                                      Control shall be deemed to have occurred
                                      under any of the foregoing subparagraphs
                                      (a) or (b) as a result of or in
                                      connection with the exchange of all
                                      outstanding shares of Series A preferred
                                      stock, Series C preferred stock and
                                      common stock repricing rights of QSRD for
                                      shares of common stock of QSRD or the
                                      Equity Offering as contemplated by the
                                      Recapitalization Agreement or any change
                                      in the composition of the Board of
                                      Directors of QSRD resulting therefrom."

                           c.       The exhibits to the Agreement are hereby
                           amended by adding immediately after Exhibit T-1
                           thereto a new Exhibit RA-1, such Exhibit RA-1 to
                           read as Exhibit RA-1 attached to this Agreement,
                           Consent and Waiver.

                           d.       The Agreement and the other Loan Documents
                           are hereby modified and amended such that all
                           references contained therein to (i) Queen Sand
                           Resources, Inc., a Delaware corporation shall be and
                           be deemed to be references to DevX Energy, Inc., a
                           Delaware corporation, (ii) Queen Sand Resources,
                           Inc., a Nevada corporation shall be and be deemed to
                           be references to DevX Energy, Inc., a Nevada
                           corporation, and (iii) Queen Sand Operating Co., a
                           Nevada corporation shall be and be deemed to be
                           references to DevX Operating Company, a Nevada
                           corporation.

                  3.       Consent to Repurchase of Senior Notes and
Application of Proceeds. The Lenders hereby waive any non-compliance with the
terms and provisions of Sections 9.04, 9.16, 9.20 and 9.21 of the Agreement,
Section 5.1 of the Security Agreement and any similar provision in any Loan
Document limiting or restricting the ability of any Obligor to change its name
and any Default resulting from any of the foregoing or under Section 10.01(k)
of the Agreement with respect to, and hereby acknowledge and consent to (i) the
repurchase of the Senior Notes as contemplated by the Recapitalization
Agreement provided that such repurchase is financed entirely by the proceeds of
the Equity Offering described in the Recapitalization Agreement, (ii) the Share
Exchange as contemplated by the terms of the Recapitalization Agreement, and
(iii) the change of the corporate name of (a) Queen Sand Resources, Inc., a
Delaware corporation to DevX Energy, Inc., a Delaware corporation, (b) Queen
Sand Resources, Inc., a Nevada corporation to DevX Energy, Inc., a Nevada
corporation, and (c) Queen Sand Operating Co., a Nevada corporation to DevX
Operating Company, a Nevada corporation. The Lenders hereby also consent,
acknowledge and agree that the net proceeds received by DEVX under the Equity
Offering contemplated by the Recapitalization Agreement shall be applied first
to the repurchase of the Senior Notes and second to the prepayment of any of
the Loans or other amounts payable under the Agreement (provided that (i) no
reduction in the Aggregate Commitments shall result solely from any of the
foregoing events and transactions, and (ii) any such prepayment of Loans may be
reborrowed during the Revolving Credit Period subject to the then effective
Aggregate Commitments in accordance with Section 2.07(d) of the Agreement).
Such waiver, consent and agreement as provided herein is specific in time and
in intent and does not constitute, nor should it be construed as constituting,
except to the extent expressly set forth herein, a waiver or modification of
any term of, or right, power, or privilege under, the Agreement, the other Loan
Documents, or any agreement, contract, indenture, documents, or instrument
mentioned therein. Nothing herein constitutes a waiver of any Event of Default
except as expressly set out herein. Such waiver does not preclude any exercise
or further exercise of any other right, power, or privilege under any Loan
Document.



                                       3
<PAGE>   4





                  4.       Conditions Precedent to the Effectiveness of this
Amendment and Waiver.

                  The effectiveness of this Amendment, Consent and Waiver is
subject to the fulfillment, to the satisfaction of Agents and their counsel, of
each of the following conditions:

                           a.       Completion of the Share Exchange and Equity
                           Offering contemplated by the Recapitalization
                           Agreement on or before October 31, 2000 or such
                           extended date as may be agreed to by the parties to
                           the Recapitalization Agreement; provided that any
                           extension of the completion of such Share Exchange
                           and Equity Offering beyond January 31, 2001 shall
                           require the written consent of the Agents.

                           b.       Collateral Agent shall have received each
                           of the following documents, in form and substance
                           satisfactory to Collateral Agent and its counsel,
                           duly executed, and each such document shall be in
                           full force and effect:

                           (i)      this Amendment, Consent and Waiver;

                           (ii)     the Reaffirmation and Consent (as
                                    hereinafter defined); and

                           (iii)    a certificate executed by a Responsible
                                    Officer of Borrower certifying that no
                                    Event of Default has occurred and is
                                    continuing.

                           (c)      The representations and warranties in
                                    Section 5 of this Amendment, Consent and
                                    Waiver, the Agreement as amended by Section
                                    2 of this Amendment, Consent and Waiver, and
                                    the other Loan Documents shall be true and
                                    correct in all material respects on and as
                                    of the date hereof, as though made on such
                                    date (except to the extent that such
                                    representations and warranties relate solely
                                    to an earlier date);

                           (d)      After giving effect hereto, no Event of
                                    Default or event which with the giving of
                                    notice or passage of time would constitute
                                    an Event of Default shall have occurred and
                                    be continuing on the date hereof, nor shall
                                    result from the consummation of the
                                    transactions contemplated herein;

                           (e)      No injunction, writ, restraining order, or
                                    other order of any nature prohibiting,
                                    directly or indirectly, the consummation of
                                    the transactions contemplated herein shall
                                    have been issued and remain in force by any
                                    governmental authority against Borrower,
                                    DEVX, any Subsidiary Guarantor, any Lender,
                                    Collateral Agent, Administrative Agent, or
                                    any of their Affiliates;

                           (f)      No material adverse change shall have
                                    occurred in the financial condition of
                                    Borrower, DEVX, any Subsidiary Guarantor, or
                                    in the value of the Collateral; and



                                       4
<PAGE>   5




                           (g)      All other documents and legal matters in
                                    connection with the transactions
                                    contemplated by this Amendment, Consent and
                                    Waiver shall have been delivered or executed
                                    or recorded and shall be in form and
                                    substance reasonably satisfactory to
                                    Collateral Agent and its counsel.

                  5.       Representations, Warranties and Covenants. Each of
DEVX and the Borrower hereby represents and warrants to the Agents and the
Lenders that: (a) the execution, delivery, and performance of this Amendment,
Consent and Waiver and of the Agreement, as amended by this Amendment, are
within its corporate powers, have been duly authorized by all necessary
corporate action, and are not in contravention of any law, rule, or regulation,
or any order, judgment, decree, writ, injunction, or award of any arbitrator,
court, or governmental authority, or of the terms of its charter or bylaws, or
of any contract or undertaking to which it is a party or by which any of its
properties may be bound or affected; and (b) this Amendment, Consent and Waiver
and the Agreement, as amended by this Amendment, constitute the legal, valid,
and binding obligation of each of DEVX and the Borrower, enforceable against
each of DEVX and the Borrower in accordance with their terms. Promptly upon
request by Collateral Agent, DevX and Borrower shall, and shall cause each
current Subsidiary Guarantor to execute and deliver such financing statement
amendments and other modifications, amendments and supplements to the Security
Instruments reasonably required to maintain the perfection and priority of the
Liens of the Lenders on the Collateral in light of the corporate name changes
of certain of the Obligors described herein.

                  6.       Reaffirmation and Consent. Concurrently herewith,
DEVX and the Borrower shall cause each current Subsidiary Guarantor to execute
and deliver to the Agents the Reaffirmation and Consent attached hereto as
Exhibit D (the Reaffirmation and Consent).

                  7.       Choice of Law and Venue; Jury Trial Waiver. Section
12.13 of the Agreement is incorporated herein by this reference as though fully
set forth herein.

                  8.       Miscellaneous.

                           a.       Upon the effectiveness of this Amendment,
                           Consent and Waiver, each reference in the Agreement
                           to this Agreement, hereunder, herein, hereof or
                           words of like import referring to the Agreement
                           shall mean and refer to the Agreement as amended by
                           this Amendment, Consent and Waiver.

                           b.       Upon the effectiveness of this Amendment,
                           Consent and Waiver, each reference in the Loan
                           Documents to the Agreement, thereunder, therein,
                           thereof or words of like import referring to the
                           Agreement shall mean and refer to the Agreement as
                           amended by this Amendment, Consent and Waiver.

                           c.       This Amendment, Consent and Waiver may be
                           executed in any number of counterparts, all of which
                           taken together shall constitute one and the same
                           instrument and any of the parties hereto may execute
                           this Amendment, Consent and Waiver by signing any
                           such counterpart. Delivery of an executed
                           counterpart of this Amendment, Consent and Waiver by
                           telefacsimile shall be equally as effective as
                           delivery of a manually executed counterpart of this
                           Amendment, Consent and Waiver.





                                       5
<PAGE>   6




                           Any party delivering an executed counterpart of this
                           Amendment, Consent and Waiver by telefacsimile also
                           shall deliver a manually executed counterpart of
                           this Amendment, Consent and Waiver but the failure
                           to deliver a manually executed counterpart shall not
                           affect the validity, enforceability, and binding
                           effect of this Amendment, Consent and Waiver.


                           d.       The parties hereto agree that the
                           transactions contemplated by the Recapitalization
                           Agreement, including, without limitation, the
                           repurchasing of all or a portion of the Senior Notes
                           in accordance therewith, do not constitute
                           transactions governed by the Side Letter and (i) no
                           further consent or approval by any Agent or Lender
                           shall be required and (ii) no fees or other
                           obligations of any Obligor shall be due and payable,
                           under the terms of the Side Letter as a result
                           thereof.





                  [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK]






                                       6
<PAGE>   7


                  IN WITNESS WHEREOF, the parties hereto have caused this
Amendment to be executed as of the date first written above.

<TABLE>
<S>                                              <C>
                                                 DEVX ENERGY, INC., formerly known as Queen Sand
                                                 Resources, Inc., a Delaware corporation


                                                 By:
                                                      ----------------------------------------------
                                                      Robert P. Lindsay
                                                      Chief Operating Officer


                                                 DEVX ENERGY, INC., formerly known as Queen Sand
                                                 Resources, Inc., a Nevada corporation


                                                 By:
                                                      ----------------------------------------------
                                                      Robert P. Lindsay
                                                      Chief Operating Officer

                                                 Address for Notices for DEVX and the Borrower:

                                                 DevX Energy, Inc.
                                                 13760 Noel Road, Suite 1030
                                                 Dallas, Texas 75240
                                                 Attention: Mr. William W. Lesikar
                                                 Telephone: (972) 383-8258
                                                 Facsimile: (972) 233-9575

                                                 with a copy to:

                                                 DevX Energy, Inc.
                                                 30 Metcalfe Street
                                                 Ottawa, Canada KIP 5L4
                                                 Attention: Mr. Brian J. Barr
                                                 Telephone: (613) 230-7211
                                                 Facsimile: (613) 230-6055

                                                 And

                                                 Haynes & Boone LLP
                                                 1600 North Collins Boulevard, Suite 200
                                                 Richardson, Texas 75080
                                                 Attention: Mr. William L. Boeing
                                                 Telephone: (972) 680-7553
                                                 Facsimile: (972) 692-9053

</TABLE>



                                       7
<PAGE>   8




<TABLE>
<S>                                              <C>
COLLATERAL AGENT:                                ABLECO FINANCE LLC, as Collateral Agent


                                                 By:
                                                      ----------------------------------------------
                                                      Kevin P. Genda
                                                      Senior Vice President and
                                                      Chief Credit Officer

                                                 Address for Notices:

                                                 450 Park Avenue.
                                                 New York, New York 10022
                                                 Attention: Kevin P. Genda
                                                 Telephone: (212) 891-2117
                                                 Facsimile: (212) 755-3009

                                                 with a copy to:

                                                 BROBECK PHLEGER & HARRISON LLP
                                                 550 South Hope Street, Suite 2100
                                                 Los Angeles, California 90071
                                                 Telephone: (213) 489-4060
                                                 Facsimile: (213) 745-3345
                                                 Attention: John Francis Hilson, Esq.


ADMINISTRATIVE AGENT:                            FOOTHILL CAPITAL CORPORATION


                                                 By:
                                                      ----------------------------------------------

                                                      ----------------------------------------------

                                                      ----------------------------------------------



                                                 Address for Notices:

                                                 11111 Santa Monica Boulevard
                                                 Los Angeles, California 90025
                                                 Attention: Business Finance Division Manager
                                                 Telephone: (310) 996-7000
                                                 Facsimile: (310) 478-9788
</TABLE>





                                       8
<PAGE>   9




<TABLE>
<S>                                              <C>
LENDER:                                          ABLECO FINANCE LLC



                                                 By:
                                                      ----------------------------------------------
                                                      Kevin P. Genda
                                                      Senior Vice President and
                                                      Chief Credit Officer


LENDER:                                          FOOTHILL CAPITAL CORPORATION

                                                 By:
                                                      ----------------------------------------------

                                                 Name:
                                                      ----------------------------------------------

                                                 Title:
                                                      ----------------------------------------------

</TABLE>



                                       9
<PAGE>   10







                                   EXHIBIT D
                           Reaffirmation and Consent


                  All capitalized terms used herein but not otherwise defined
herein shall have the meanings ascribed to them in that certain Amendment
Number Four and Consent and Waiver to Credit Agreement, dated as of October 24,
2000 (the "Amendment, Consent and Waiver"). Each of the undersigned hereby (a)
represents and warrants to the Agents and the Lenders that the execution,
delivery, and performance of this Reaffirmation and Consent are within its
corporate powers, have been duly authorized by all necessary corporate action,
and are not in contravention of any law, rule, or regulation, or any order,
judgment, decree, writ, injunction, or award of any arbitrator, court, or
governmental authority, or of the terms of its charter or bylaws, or of any
contract or undertaking to which it is a party or by which any of its
properties may be bound or affected; (b) consents to the transactions
contemplated by the Recapitalization Agreement and the amendment of the
Agreement by the Amendment, Consent and Waiver; (c) acknowledges and reaffirms
its obligations owing to the Agents and the Lenders under its respective Second
Amended and Restated Guaranty Agreement dated as of October 22, 1999 (each a
"Guaranty", and collectively, the "Guaranties") and any other Loan Documents to
which it is party; and (d) agrees that the Guaranty and any other Loan
Documents to which it is a party are and shall remain in full force and effect.
Although each of the undersigned has been informed of the matters set forth
herein and has acknowledged and agreed to same, it understands that the Agents
and the Lenders have no obligation to inform it of such matters in the future
or to seek its acknowledgement or agreement to future amendments, and nothing
herein shall create such a duty. This Reaffirmation and Consent may be executed
in any number of counterparts and by different parties on separate
counterparts, each of which, when executed and delivered, shall be deemed to be
an original, and all of which, when taken together, shall constitute but one
and the same Reaffirmation and Consent. Delivery of an executed counterpart of
this Reaffirmation and Consent by telefacsimile shall be equally as effective
as delivery of an original executed counterpart of this Reaffirmation and
Consent. Any party delivering an executed counterpart of this Reaffirmation and
Consent by telefacsimile also shall deliver an original executed counterpart of
this Reaffirmation and Consent but the failure to deliver an original executed
counterpart shall not affect the validity, enforceability, and binding effect
of this Reaffirmation and Consent. This Reaffirmation and Consent shall be
governed by internal laws of the State of New York as more fully set forth in
Section 5.04 of the Guaranties.



                           DEVX ENERGY, INC., formerly known as Queen Sand
                           Resources, Inc., a Delaware corporation


                           By:
                                -----------------------------------------------
                                Robert P. Lindsay
                                Vice President




                                      10
<PAGE>   11





                             DEVX Operating Company, formerly known as
                             Queen Sand Operating Co., a Nevada corporation


                             By:
                                 ---------------------------------------------
                                 Robert P. Lindsay
                                 Vice President


                             CORRIDA RESOURCES, INC.,
                             a Nevada corporation


                             By:
                                 ---------------------------------------------
                                 Robert P. Lindsay
                                 Vice President




                                      11