<Page>

                                                               EXHIBIT 10(d)(iv)


            AMENDMENT NO. 1 TO REVOLVING LOAN AND SECURITY AGREEMENT


       Amendment No. 1 ("Amendment") dated as of February 14, 2002 to Revolving
Loan and Security Agreement dated as of November 30, 2000 between AMERICAN
SCIENCE AND ENGINEERING, INC., a Massachusetts corporation ("Borrower") and HSBC
BANK USA, a bank organized under the laws of the State of New York ("Bank").

                              W I T N E S S E T H:
                              --------------------

       WHEREAS, Borrower has heretofore entered into financing arrangements with
Bank pursuant to the terms and conditions of an Revolving Loan and Security
Agreement dated as of November 30, 2000 between Bank and Borrower (as amended,
the "Credit Agreement") and the Financing Agreements (as defined in the Credit
Agreement);

       WHEREAS, Borrower has requested and Bank is willing, subject to the terms
and conditions hereof, to amend the Credit Agreement to, among other things,
increase the commitment thereunder.

       NOW, THEREFORE, in consideration of the foregoing premises, the mutual
covenants and agreements contained herein and other good and valuable
consideration, the receipt and sufficiency of which is acknowledged, Borrower
and Bank mutually covenant, warrant and agree as follows:

                             SECTION 1. DEFINITIONS.

       SECTION 1.1 INTERPRETATION. For purposes of this Amendment, unless
otherwise defined herein, all capitalized terms used herein including, but not
limited to, those capitalized terms used and/or defined in the recitals hereto,
shall have the respective meanings assigned to such terms in the Credit
Agreement.

                              SECTION 2. AMENDMENT.

       SECTION 2.1 AMENDMENT TO SECTION 1.1

       (a) The definition of the term "Commitment" in the Credit Agreement is
amended by deleting the reference to "$10,000,000.00" contained therein and
replacing it with "$20,000,000.00".

       (b) The definition of "Commitment Amount" in the Credit Agreement is
amended by deleting the reference to "TEN MILLION AND 00/100 ($10,000,000.00)
DOLLARS" contained therein and replacing it with "$20,000,000.00".

       (c) The definition of "Financing Agreements" in the Credit Agreement is
amended by adding ", the letter agreement re: credit line for equipment
purchases dated February

<Page>


14, 2002 and any time note(s) executed in connection therewith," after the words
"Related Documents" and before the word "and" therein.

       (d) The definition of "Maximum Amount" in the Credit Agreement is amended
by deleting the reference to "$10,000,000.00" contained therein and replacing it
with "$20,000,000.00".

       SECTION 2.2 AMENDMENT TO SECTION 2.1.

       Section 2.1(b)(ii) of the Credit Agreement is deleted and replaced with
the following:

            "(ii) No Letters of Credit shall have an expiration date (including
            all rights of the Borrower or the beneficiary to require renewal)
            later than the Termination Date, unless approved in writing by the
            Bank in its sole discretion."

       SECTION 2.3 AMENDMENT TO SECTION 2.2(a) AND SCHEDULE 7.1. Schedule 7.1
of the Credit Agreement is amended so that the reference to "$10,000,000.00"
contained therein is deleted and replaced with "$20,000,000.00."

       SECTION 2.4 AMENDMENT TO SECTION 2.4. Section 2.4 of the Credit Agreement
is amended by deleting EXHIBIT A therefrom and replacing it with Exhibit A
annexed hereto and made a part hereof and all references to the term "Note"
shall be deemed to be a reference to the Note attached as Exhibit A hereto.

       SECTION 2.5 AMENDMENT TO SECTION 7.4. Section 7.4 of the Credit Agreement
is amended by adding "and maintain its jurisdiction of incorporation in the
Commonwealth of Massachusetts" after the word "Agreement," and before the word
"unless" therein and by adding "or jurisdiction of incorporation" after the word
"business" and before the "." therein.

       SECTION 2.6 AMENDMENT TO SECTION 7.8. Section 7.8 of the Credit Agreement
is amended by adding the following at the end of the first paragraph thereof:

         "Borrower shall cooperate with the Bank in obtaining control of
         Collateral consisting of Deposit Accounts, Investment Property,
         Letter-of-Credit Rights or Electronic Chattel Paper."

       SECTION 2.7 AMENDMENT TO SECTION 9.1 AND SCHEDULE 9.1. Paragraph (d) of
Schedule 9.1 of the Credit Agreement is amended by adding the words "Deposit
Accounts, Letter-of-Credit Rights and Electronic Chattel Paper" after the words
"Investment Property" and before the word "fixtures" therein.

       SECTION 2.8 AMENDMENT TO SECTION 16.

<Page>


       A new Section 16.12 is added to the Credit Agreement as follows:

     "SECTION 16.12 ADDITIONAL RIGHTS OF BANK

       (a) WARRANTIES. Bank may sell the Collateral without giving any
warranties. Bank may specifically disclaim any warranties of title or the like.
This procedure will not be considered adversely to affect the commercial
reasonableness of any sale of the Collateral.

       (b) SALES ON CREDIT. If Bank sells any of the Collateral on credit,
Borrower will be credited only with payments actually made by the purchaser,
received by Bank and applied to the Obligations. If the purchaser fails to pay
for the Collateral, Bank may resell the Collateral, and Borrower shall be
credited with the proceeds of the sale."

                        SECTION 3. CONDITIONS PRECEDENT.

       This Amendment shall only become effective upon the fulfillment, prior to
or contempor aneously with the execution hereof, of the following conditions
precedent:

       SECTION 3.1.a. EXECUTION OF AMENDMENT. The execution and delivery by
Borrower and Bank of an original of this Amendment;

       SECTION 3.1.b. PAYMENT OF FEES. The payment by Borrower of: (a ) a single
amendment fee to the Bank in the amount of $25,000.00 in connection with this
Amendment and the Amendment No. 1 to Export Credit and Security Agreement dated
the date hereof between the Bank and the Borrower; and (b) all reasonable legal
fees and expenses of the Bank incurred in connection with the preparation of
this Amendment, and any other documents, instruments or agreements executed in
connection herewith or therewith;

       SECTION 3.1.c. EXECUTION OF NEW NOTE. The execution and delivery by
Borrower of the Amended and Restated Revolving Loan Promissory Note in the form
of EXHIBIT A annexed hereto and made a part hereof;

       SECTION 3.1.d. EXIMBANK ACKNOWLEDGMENT. Receipt by the Bank of the letter
dated December 27, 2001 by the Bank to the Eximbank acknowledged by the
Eximbank; and

       SECTION 3.1.e. EXECUTION OF RELATED DOCUMENTS AND ADDITIONAL MATTERS. The
execution and delivery by Borrower of: (a) an Amendment No. 1 to Export Credit
and Security Agreement; (b) an Amended and Restated Export Credit Promissory
Note; and (c) all other documents and legal matters in connection with this
Amendment and the transactions contemplated by the Credit Agreement as amended
by this Amendment shall be reasonably satisfactory in form and substance to
Bank.

                            SECTION 4. MISCELLANEOUS.

       SECTION 4.1 REPRESENTATIONS AND WARRANTIES. (a) All terms, conditions,
covenants, representations and warranties (other than any such representation
and warranty that,

<Page>


by its terms, refers to a specific date other than the date hereof; PROVIDED,
HOWEVER, that the Schedules to the Credit Agreement are deemed updated by the
information contained in the Schedules attached hereto) of Borrower contained in
the Credit Agreement, except as expressly modified hereby, are ratified,
confirmed and reaffirmed by Borrower as of the date hereof, remain in full force
and effect as of the date hereof, and are incorporated herein by reference as if
fully set forth herein.

       (b) All terms, conditions, covenants, representations and warranties
(other than any such representation and warranty that, by its terms, refers to a
specific date other than the date hereof; PROVIDED, HOWEVER, that the Schedules
to the Credit Agreement are deemed updated by the information contained in the
Schedules attached hereto) of Borrower contained in all of the other Financing
Agreements, except as expressly modified hereby, are ratified, confirmed and
reaffirmed by Borrower as of the date hereof, remain in full force and effect as
of the date hereof, and are subject to the terms of this Amendment.

       (c) The Borrower represents and warrants to Bank that it has the
necessary power and has taken all necessary action to make this Amendment the
valid and enforceable obligation it purports to be, and that this Amendment
constitutes the legal, valid and binding obligation of Borrower, enforceable
against Borrower in accordance with its terms, except as enforcement may be
limited by principles of equity, bankruptcy, insolvency, or other laws affecting
the enforcement of creditors' rights generally.

       SECTION 4.2 GOVERNING LAW. THIS AMENDMENT AND THE OTHER FINANCING
AGREEMENTS, AND ALL TRANSACTIONS HEREUNDER, AND ALL THE RIGHTS OF THE PARTIES,
SHALL BE GOVERNED AS TO VALIDITY, CONSTRUCTION, ENFORCEMENT AND IN ALL OTHER
RESPECTS BY THE LAWS OF THE STATE OF NEW YORK. THE BORROWER AGREES THAT THE
COURTS OF THE STATE OF NEW YORK OR THE UNITED STATES DISTRICT COURT FOR THE
UNITED STATES IN THE SOUTHERN DISTRICT OF NEW YORK SHALL HAVE JURISDICTION TO
HEAR AND DETERMINE ANY CLAIMS OR DISPUTES PERTAINING TO THE FINANCING
TRANSACTIONS OF WHICH THIS AMENDMENT IS A PART AND/OR TO ANY MATTER ARISING OR
IN ANY WAY RELATED TO THIS AMENDMENT OR ANY OTHER AGREEMENT BETWEEN THE BANK AND
THE BORROWER EXPRESSLY SUBMITS AND CONSENTS IN ADVANCE TO SUCH JURISDICTION IN
ANY ACTION OR PROCEEDING AND BORROWER WAIVES PERSONAL SERVICE OF PROCESS AND
AGREES THAT A SUMMONS AND COMPLAINT COMMENCING AN ACTION OR PROCEEDING IN ANY
SUCH COURT SHALL BE PROPERLY SERVED AND SHALL CONFER PERSONAL JURISDICTION IF
SERVED BY REGISTERED OR CERTIFIED MAIL TO BORROWER, OR AS OTHERWISE PROVIDED BY
THE LAWS OF NEW YORK STATE OR THE UNITED STATES. NOTHING HEREIN SHALL AFFECT THE
RIGHT OF BANK TO COMMENCE LEGAL PROCEEDINGS OR OTHERWISE PROCEED AGAINST THE
BORROWER EITHER IN ANY OTHER JURISDICTION OR TO SERVE PROCESS IN ANY OTHER
JURISDICTION OR TO SERVE PROCESS IN ANY OTHER MANNER PERMITTED BY APPLICABLE
LAW.

<Page>


       SECTION 4.3 WAIVERS.

       (a) PREJUDGMENT REMEDY, ETC. THE BORROWER ACKNOWLEDGES THAT THE ADVANCES
ARE COMMERCIAL TRANSACTIONS AND WAIVES ITS RIGHT TO NOTICE AND HEARING ALLOWED
BY ANY STATE OR FEDERAL LAW WITH RESPECT TO ANY PREJUDGMENT REMEDY, AND FURTHER
WAIVES ALL RIGHTS TO REQUEST THE POSTING OF A BOND, WITH OR WITHOUT SURETY, TO
PROTECT THE BORROWER OR ANY ENDORSER, GUARANTOR OR SURETY OF ANY OF THE
OBLIGATIONS AGAINST DAMAGES THAT MAY BE CAUSED BY ANY PREJUDGMENT REMEDY. THE
BORROWER FURTHER WAIVES DILIGENCE, DEMAND, PRESENTMENT FOR PAYMENT, NOTICE OF
NONPAYMENT, PROTEST AND NOTICE OF ANY RENEWALS OR EXTENSIONS.

       (b) JURY WAIVER. THE BORROWER HEREBY WAIVES TRIAL BY JURY IN ANY COURT IN
ANY SUIT, ACTION OR PROCEEDING ON ANY MATTER ARISING IN CONNECTION WITH OR IN
ANY WAY RELATED TO THE FINANCING TRANSACTIONS OF WHICH THIS AMENDMENT IS A PART
AND/OR THE ENFORCEMENT OF ANY OF THE BANK'S RIGHTS, INCLUDING WITHOUT
LIMITATION, TORT CLAIMS.

       (c) VOLUNTARY NATURE OF WAIVERS. THE BORROWER ACKNOWLEDGES THAT IT MAKES
THE FOREGOING WAIVERS IN SUBSECTIONS (a) AND (b) ABOVE, KNOWINGLY, WILLINGLY,
WITHOUT DURESS AND VOLUNTARILY AND ONLY AFTER CONSIDERATION OF THE RAMIFICATIONS
OF SUCH WAIVERS WITH ITS ATTORNEYS.

       SECTION 4.4 EVENTS OF DEFAULT OR EVENT OF DEFAULT. No Events of Default
or Event of Default has occurred and is continuing on the date hereof or shall
be continuing after giving effect to, or result from, the execution and delivery
of this Amendment and Borrower has no present reason to believe any Events of
Default or Event of Default might or would occur after the date hereof.

       SECTION 4.5 SURVIVAL OF REPRESENTATIONS AND WARRANTIES. All
representations and warranties made in this Amendment or any other documents
furnished in connection with this Amendment shall survive the execution and
delivery of this Amendment and no investigation by the Bank or any closing shall
affect the representations and warranties or the right of the Bank to rely upon
them.

       SECTION 4.6 REFERENCE TO CREDIT AGREEMENT. The Credit Agreement, the
Financing Agreements and any and all other agreements, documents, or instruments
heretofore, now or hereafter executed and delivered pursuant to the terms hereof
or pursuant to the terms of the Credit Agreement, as amended hereby, are hereby
amended so that any reference in the Credit Agreement, the Financing Agreements
or such other agreements, documents or instruments to the Credit Agreement shall
mean a reference to the Credit Agreement as amended hereby.

<Page>


       SECTION 4.7 FURTHER ASSURANCES. The parties hereto shall execute and
deliver such additional documents and take such additional action as may be
necessary or desirable to effectuate the provisions and purposes of this
Amendment.

       SECTION 4.8 SUCCESSORS AND ASSIGNS. Borrower and Bank as such terms are
used herein shall include the legal representatives, successors and assigns of
those parties.

       SECTION 4.9 COUNTERPARTS. This Amendment may be executed in any number of
counterparts and by the Bank and Borrower on separate counterparts, each of
which when so executed and delivered shall be an original, but all such
counterparts shall together constitute one and the same Amendment.

       SECTION 4.10 SEVERABILITY. Any provision of this Amendment held by a
court of competent jurisdiction to be invalid or unenforceable shall not impair
or invalidate the remainder of this Amendment and the effect thereof shall be
confined to the provision so held to be invalid or unenforceable.

       SECTION 4.11 CONFLICTING PROVISIONS. In the event of any conflict in the
terms and provisions of this Amendment and the terms and provisions of the
Credit Agreement, the terms and provisions of this Amendment shall govern.

       SECTION 4.12 ENTIRE AGREEMENT. This Amendment constitutes the entire
agreement and understanding between the parties hereto with respect to the
transactions contemplated hereby and supersedes all prior negotiations,
understandings, and agreements between such parties with respect to such
transaction.

       IN WITNESS WHEREOF, this Amendment has been duly executed by the parties
hereto as of the day and year first above written.


                                         AMERICAN SCIENCE AND ENGINEERING, INC.

                                         By
                                           ------------------------------------
                                                                         (title)

                                         HSBC BANK USA

                                         By
                                           ------------------------------------
                                                                         (title)






                                    EXHIBIT A

               AMENDED AND RESTATED REVOLVING LOAN PROMISSORY NOTE


                     $20,000,000.00               Dated As of February 14, 2002


       For value received, the undersigned, AMERICAN SCIENCE AND ENGINEERING,
INC., a Massachusetts corporation ("Maker"), does hereby promise to pay to HSBC
BANK USA ("Lender"), or order, at its office at 17 South Broadway, Nyack, New
York 10960, or at such other place as the holder hereof (including Lender,
hereinafter referred to as "Holder") may designate, the sum of TWENTY MILLION
AND 00/100 ($20,000,000) DOLLARS, or the aggregate unpaid principal amount of
all Advances made by Lender to Borrower pursuant to that certain Revolving Loan
and Security Agreement dated as of November 30, 2000 by and between the Maker
and the Lender as amended by Amendment No. 1 to Revolving Loan and Security
Agreement dated the date hereof by and between the Maker and the Lender (as the
foregoing maybe amended, modified, restated or supplemented and in effect from
time to time, the "RLSA"), whichever is less, together with interest on the
unpaid balance of this Note beginning as of the date hereof, before or after
maturity or judgment (but subject to the default rate of interest set forth
below), at the rate provided in the RLSA, which rate shall be computed and
payable monthly in arrears on the basis of a Three Hundred Sixty (360) day year
and actual days elapsed, together with all taxes levied or assessed on this Note
or the debt evidenced hereby against the Holder, and together with all costs,
expenses and reasonable attorneys' and other professional fees incurred in any
action to collect this Note or to enforce, protect, preserve, defend or
foreclose any security agreement or other agreement securing this Note or to
protect, preserve, enforce, defend, sustain or foreclose the lien of said
security agreement or other agreement or in any litigation or controversy
arising from or connected with said security agreement or other agreement or
this Note. Capitalized terms used above and below shall have the meanings
assigned in the RLSA.

       This Note has been executed and delivered, and advances hereunder and
payments thereof shall be made, in accordance with the terms and provisions of
the RLSA, and this Note is subject to the provisions of the RLSA. Principal,
interest and any other sums due hereunder shall be payable at the time and in
the amounts provided for in the RLSA, including without limitation, on the
Maturity Date. Holder may, in its sole discretion, charge any amounts due
hereunder or under the RLSA to any account of Maker maintained with the Holder
pursuant to the RLSA or otherwise.

       Maker agrees that: (i) if principal, any installment of interest or any
other sum due hereunder is not paid when due and payable, or (ii) if any Event
of Default shall occur under the RLSA or under any other Financing Agreement,
then, upon the happening of any such Event of Default, the entire indebtedness
with accrued interest thereon due under this Note shall, automatically or at the
option of the Holder, as the case may be pursuant to the RLSA, become

<Page>


immediately due and payable without notice or demand. Failure to exercise such
option shall not constitute a waiver of the right to exercise the same in the
event of any subsequent default. Upon the occurrence of such an event of
default, the interest rate on this Note shall automatically increase without
notice to the rate provided in the RLSA.

       Notwithstanding any other provisions of this Note, it is the
understanding and agreement of the Maker and Holder (and any guarantors of
Maker's liabilities, if any) that the maximum rate of interest to be paid by the
Maker (or guarantors of Maker's liabilities) to the Holder shall not exceed the
highest or the maximum rate of interest permissible to be charged by a
commercial lender such as Lender to a commercial borrower such as Maker. Any
amount paid in excess of such rate shall be considered to have been payments in
reduction of principal.

       The Maker gives the Holder a lien and right of setoff for all Maker's
Obligations upon and against all the deposits, credits, collateral and property
of Maker, if any, now or hereafter in the possession or control of the Holder or
in transit to it. Holder may, upon the occurrence of an Event of Default
hereunder, apply or set off the same, or any part thereof, to any liability of
the Maker, even though unmatured.

       Failure by the Holder to insist upon the strict performance by Maker of
any terms and provisions herein shall not be deemed to be a waiver of any terms
and provisions herein, and the Holder shall retain the right thereafter to
insist upon strict performance by the Maker of any and all terms and provisions
of this Note or any document securing the repayment of this Note.

       THE MAKER HEREBY (I) WAIVES TRIAL BY JURY IN ANY COURT AND IN ANY SUIT,
ACTION OR PROCEEDING ON ANY MATTER ARISING IN CONNECTION WITH OR IN ANY WAY
RELATED TO THE FINANCING TRANSACTIONS OF WHICH THIS NOTE IS A PART AND/OR THE
ENFORCEMENT OF ANY OF THE HOLDER'S RIGHTS AND REMEDIES, INCLUDING WITHOUT
LIMITATION, TORT CLAIMS, (II) ACKNOWLEDGES THAT THE LOAN TRANSACTION EVIDENCED
BY THIS NOTE AND THE RLSA IS A COMMERCIAL TRANSACTION AND WAIVES ITS RIGHT TO
NOTICE AND HEARING AS ALLOWED BY ANY STATE OR FEDERAL LAW WITH RESPECT TO ANY
PREJUDGMENT REMEDY WHICH THE HOLDER MAY DESIRE TO USE, AND FURTHER WAIVES ALL
RIGHTS TO REQUEST THAT THE HOLDER POST A BOND, WITH OR WITHOUT SURETY, TO
PROTECT THE MAKER OR ANY GUARANTOR OR SURETY OF ANY OF THE OBLIGATIONS OF MAKER
TO HOLDER AGAINST DAMAGES THAT MAY BE CAUSED BY ANY PREJUDGMENT REMEDY SOUGHT OR
OBTAINED BY HOLDER, AND (III) WAIVES DILIGENCE, DEMAND, PRESENTMENT FOR PAYMENT,
NOTICE OF NONPAYMENT. PROTEST AND NOTICE OF PROTEST, AND NOTICE OF ANY RENEWALS
OR EXTENSIONS OF THIS NOTE. The Maker acknowledges that it makes the waivers set
forth in this paragraph knowingly, voluntarily, without duress and only after
consideration of the ramifications of this waiver with its attorneys. The Maker
further acknowledges that the Lender has not agreed with or represented to Maker
or any other party hereto that the provisions of this paragraph will not be
fully enforced in all instances.

<Page>


       THIS NOTE IS GIVEN IN AMENDMENT AND RESTATEMENT OF AND NOT IN REPAYMENT
OR EXTINGUISHMENT OF THE EXISTING OBLIGATIONS EVIDENCED BY THE REVOLVING LOAN
PROMISSORY NOTE DATED AS OF NOVEMBER 30, 2000 MADE BY THE MAKER PAYABLE TO THE
LENDER IN THE ORIGINAL PRINCIPAL AMOUNT OF UP TO $10,000,000.00 AND EVIDENCES
OBLIGATIONS OF UP TO $20,000,000.00.

       This Note is an instrument under seal and shall be governed by the laws
of the State of New York without regard to the principles of conflicts of law.


                                         AMERICAN SCIENCE AND ENGINEERING, INC.

                                         By
                                           ------------------------------------
                                           Andrew Morrison
                                           Its Chief Financial Officer