<PAGE>   1
                                  EXHIBIT 10.18


                       AMENDMENT NO. 2 TO CREDIT AGREEMENT

         AMENDMENT dated as of May 15, 2000 to the Amended and Restated Credit
Agreement dated as of November 28, 1997 (as heretofore amended, the "CREDIT
AGREEMENT") among VALERO ENERGY CORPORATION (the "BORROWER"), the BANKS party
thereto (the "BANKS"), MORGAN GUARANTY TRUST COMPANY OF NEW YORK, as
Administrative Agent (the "ADMINISTRATIVE AGENT") and BANK OF MONTREAL, as
Syndication Agent and Issuing Bank.

         The parties hereto agree as follows:

         SECTION 1. Defined Terms; References. Unless otherwise specifically
defined herein, each capitalized term used herein which is defined in the Credit
Agreement has the meaning assigned to such term in the Credit Agreement. Each
reference to "hereof", "hereunder", "herein" and "hereby" and each other similar
reference and each reference to "this Agreement" and each other similar
reference contained in the Credit Agreement shall, after this Amendment becomes
effective, refer to the Credit Agreement as amended hereby.

         SECTION 2. Amendment of Section 6.07. Section 6.07(a) of the Credit
Agreement is amended to read as follows:

                  (a) the sum (without duplication) of (i) Consolidated Net
         Income (excluding extraordinary items) of the Borrower for the
         applicable period, plus (ii) interest expense for the Borrower and its
         Subsidiaries on the consolidated basis for such period, plus (iii)
         deferred federal and state income taxes deducted in determining such
         Consolidated Net Income for such period, plus (iv) depreciation and
         amortization expense deducted in determining such Consolidated Net
         Income for such period, plus (v) cash dividends paid by the Borrower on
         its preferred stock (other than dividends paid on preferred stock held
         by the Borrower or a Subsidiary of the Borrower) deducted in
         determining such Consolidated Net Income for such period, plus (vi)
         other noncash charges deducted in determining such Consolidated Net
         Income for such period, minus (vii) other noncash credits added in
         determining such Consolidated Net Income for such period, plus (viii)
         Deferred Turnaround and Catalyst Cost for such period, to

         SECTION 3. Amendment of Section 6.08. Section 6.08 of the Credit
Agreement is amended to read as follows:

                  SECTION 6.08. Debt. The ratio of (i) Consolidated Debt of the
          Borrower to (ii) the sum of Consolidated Debt of the Borrower plus the
          Consolidated Net Worth of the Borrower plus the involuntary
          liquidation value of outstanding shares of redeemable preferred stock
          of the Borrower will at no time during any period set forth below
          exceed the applicable maximum ratio for such period:
<PAGE>   2
                  Period                                           Maximum Ratio
                  ------                                           -------------

          Effective Date - March 30, 2001                          0.65 : 1.00

          March 31, 2001 - September 29, 2001                      0.60 : 1.00

          September 30, 2001 and thereafter                        0.55 : 1.00

          provided, that if the Borrower shall issue at least $300 million in
          equity or equity-hybrid securities prior to March 31, 2001, the ratio
          applicable to the period beginning on March 31, 2001 shall become
          applicable from the date of such issuance to and including September
          29, 2001; provided further, that for purposes of calculating the
          treatment of an equity-hybrid security which is not otherwise included
          in Consolidated Net Worth but which is mandatorily convertible into,
          or otherwise mandatorily refundable with the proceeds of, equity
          securities which will be included in Consolidated Net Worth, in each
          case within three years of the date of issuance of such equity-hybrid
          security, then until such conversion or refunding is effected, (x) if
          such equity-hybrid security represents senior unsecured indebtedness,
          the total issuance amount of such security shall be allocated 20% to
          Consolidated Debt and 80% to Consolidated Net Worth, and (y) if such
          equity-hybrid security represents subordinated indebtedness, the total
          issuance amount of such security shall be allocated 100% to
          Consolidated Net Worth.

         SECTION 4. Amendment of Section 6.11. Section 6.11 of the Credit
Agreement is amended to read as follows:

                  SECTION 6.11. Subsidiary Debt. The total Debt of all
         Consolidated Subsidiaries (excluding (i) Debt secured by a Lien
         permitted by clauses (a) through (r) of Section 6.10, (ii) Debt of a
         Person existing at the time such Person becomes a Subsidiary and not
         created in contemplation of such event, (iii) the Additional IDB, (iv)
         Debt of the Borrower owing to any Subsidiary or Debt of a Subsidiary
         owing to the Borrower or to any other Subsidiary, (v) refinancings,
         extensions, renewals or refundings of any Debt permitted by the
         foregoing clauses of this Section, provided that the principal amount
         of such Debt referred to in clauses (i), (ii) and (iii) is not
         increased and (vi) Guarantees pursuant to Section 6.12) will at no time
         exceed $5,000,000 in aggregate outstanding principal amount.

         SECTION 5. Increase of Interest Rates. The Pricing Schedule attached to
the Credit Agreement (the "EXISTING PRICING SCHEDULE") is deleted and replaced
by the Pricing Schedule attached to this Amendment (the "NEW PRICING SCHEDULE").
The New Pricing Schedule shall apply to interest and fees accruing under the
Credit Agreement on
<PAGE>   3
and after the date hereof. The Existing Pricing Schedule shall continue to apply
to interest and fees accruing under the Credit Agreement prior to the date
hereof.

         SECTION 6. Representations of Borrower. The Borrower represents and
warrants that (i) the representations and warranties of the Borrower set forth
in Article 5 of the Credit Agreement are true on and as of the date hereof and
(ii) no Default has occurred and is continuing on the date hereof.

         SECTION 7.  Governing Law.  This Amendment shall be governed by and
construed in accordance with the laws of the State of New York.

         SECTION 8. Counterparts. This Amendment may be signed in any number of
counterparts, each of which shall be an original, with the same effect as if the
signatures thereto and hereto were upon the same instrument.

         SECTION 9.  Effectiveness.  This Amendment shall become effective as of
the date hereof when the following conditions are met (the "EFFECTIVE DATE"):

                  (a) the Administrative Agent shall have received from each of
         the Borrower and the Required Banks a counterpart hereof signed by such
         party or facsimile or other written confirmation (in form satisfactory
         to the Administrative Agent) that such party has signed a counterpart
         hereof;

                  (b) the Administrative Agent shall have received an amendment
         fee for the account of each Bank that has delivered to the
         Administrative Agent on or before the close of business (New York City
         time) on April 11, 2000 a counterpart hereof signed by such Bank or
         facsimile or other written confirmation (in form satisfactory to the
         Administrative Agent) that such party has signed a counterpart hereof,
         such fee in an amount equal to 0.25% of such Bank's Commitment; and

                   (c) the acquisition contemplated by the Sale and Purchase
         Agreement for Exxon California Refining and Marketing Assets between
         Exxon Mobil Corporation and Valero Refining Company-California dated as
         of March 2, 2000 shall have closed.
<PAGE>   4
         IN WITNESS WHEREOF, the parties hereto have caused this Agreement to be
duly executed by their respective authorized officers as of the day and year
first above written.

                                    VALERO ENERGY CORPORATION

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    MORGAN GUARANTY TRUST
                                       COMPANY OF NEW YORK

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    BANK OF MONTREAL

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    BANK OF TOKYO-MITSUBISHI,
                                       LTD.

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    BANKBOSTON, N.A.

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    BANQUE NATIONALE DE
                                       PARIS, HOUSTON AGENCY

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:
<PAGE>   5
                                    BHF-BANK AKTIENGESELLSCHAFT

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    CIBC INC.

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    CREDIT LYONNAIS NEW YORK
                                       BRANCH

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    BANKONE, NA
                                       (Main Office-Chicago)

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    THE FUJI BANK, LIMITED

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    ROYAL BANK OF CANADA

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:
<PAGE>   6
                                    SOCIETE GENERALE

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    TORONTO DOMINION (TEXAS), INC.

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    BARCLAYS BANK PLC

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    CHRISTIANIA BANK, NEW YORK
                                       BRANCH

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    DEN NORSKE BANK ASA

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    GUARANTY FEDERAL BANK,
                                       F.S.B.

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:
<PAGE>   7
                                    THE INDUSTRIAL BANK OF JAPAN,
                                       LIMITED, NEW YORK BRANCH

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    THE BANK OF NOVIA SCOTIA

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    CREDIT AGRICOEL INDOSUEZ

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    THE DAI-ICHI KANGYO BANK, LTD.

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    THE FROST NATIONAL BANK

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    MELLON BANK, N.A.

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:

                                    THE SANWA BANK, LIMITED

                                    By:
                                       -----------------------------------------
                                       Name:
                                       Title:
<PAGE>   8
                                    UBS AG, STAMFORD BRANCH

                                    By:
                                       --------------------------------
                                       Name:
                                       Title:

                                    By:
                                       --------------------------------
                                       Name:
                                       Title:
<PAGE>   9
                                PRICING SCHEDULE

         The "EURO-DOLLAR MARGIN", "FACILITY FEE RATE" and "LETTER OF CREDIT
RATE" for any day are the respective percentages set forth below in the
applicable row under the column corresponding to the Status that exists on such
day:

<TABLE>
<CAPTION>
Status                        Level I     Level II     Level III     Level IV     Level V
------                        -------     --------     ---------     --------     -------
<S>                           <C>         <C>          <C>           <C>          <C>
Facility Fee Rate              0.125%      0.150%        0.175%       0.250%       0.375%

Euro-Dollar Margin
   Usage less than    25%      0.375%      0.475%        0.825%       1.00%        1.125%
   Usage greater than
   or equal to        25%      0.500%      0.600%        0.950%       1.00%        1.125%

Letter of Credit Rate
   Performance                 0.250%      0.300%        0.475%       0.500%       .5625%
   Financial                   0.500%      0.600%        0.950%       1.00%        1.125%
</TABLE>

         For purposes of this Schedule, the following terms have the following
meanings (subject to the last paragraph of this Schedule):

         "LEVEL I STATUS" exists at any date if, at such date, the Borrower's
long-term debt is rated at least BBB+ by S&P or at least Baa1 by Moody's.

         "LEVEL II STATUS" exists at any date if, at such date, (i) the
Borrower's long-term debt is rated at least BBB by S&P or at least Baa2 by
Moody's and (ii) Level I Status does not exist.

         "LEVEL III STATUS" exists at any date if, at such date, (i) the
Borrower's long-term debt is rated at least BBB- by S&P or at least Baa3 by
Moody's and (ii) neither Level I Status nor Level II Status exists.

         "LEVEL IV STATUS" exists at any date if, at such date, (i) the
Borrower's long-term debt is rated at least BB+ by S&P and at least Ba1 by
Moody's and (ii) none of Level I Status, Level II Status and Level III Status
exists.

         "LEVEL V STATUS" exists at any date if, at such date, no other Status
exists.

         "STATUS" refers to the determination of which of Level I Status, Level
II Status, Level III Status, Level IV Status or Level V Status exists at any
date.

         "USAGE" means, at any date, the percentage equivalent of a fraction (i)
the numerator of which is the sum of the aggregate principal amount of the Loans
outstanding at such date and the Letter of Credit Outstandings at such date and
(ii) the denominator of which is the aggregate amount of the Commitments at such
date. If for any reason there are outstanding Loans or Letter of Credit
Outstandings following termination of the Commitments, Usage shall be deemed to
exceed 25%.
<PAGE>   10
         The credit ratings to be utilized for purposes of this Schedule are
those assigned to the senior unsecured long-term debt securities of the Borrower
without third-party credit enhancement, and any rating assigned to any other
debt security of the Borrower shall be disregarded. The rating in effect at any
date is that in effect at the close of business on such date.

         So long as the Borrower is rated at least BB+ by S&P and at least Ba1
by Moody's, if the Borrower is split-rated and the ratings differential is one
level, the higher of the two ratings will apply (e.g., BBB/Baa3 results in Level
II Status). If the Borrower is split-rated and the ratings differential is more
than one level, the average of the two ratings (or the higher or two
intermediate ratings) shall be used (e.g., BBB/A3 results in Level I Status, as
does BBB-/A3).