<PAGE>   1
                                                                    EXHIBIT 10.4


                         ALLIED CAPITAL CORPORATION II
                               STOCK OPTION PLAN


1.  PURPOSE OF THE PLAN

            The purpose of this Stock Option Plan (this "Plan") is to advance
the interests of Allied Capital Corporation II (the "Company") by providing to
directors of the Company and to officers of the Company who have substantial
responsibility for the direction and management of the Company additional
incentives to exert their best efforts on behalf of the Company, to increase
their proprietary interest in the success of the Company, to reward outstanding
performance and to provide a means to attract and retain persons of outstanding
ability to the service of the Company.  It is recognized that the Company
cannot attract or retain these officers and directors without this
compensation.  Options granted under this Plan may qualify as "incentive stock
options," as defined in Section 422 of the Internal Revenue Code of 1986, as
amended (the "Code").

2.  ADMINISTRATION

            This Plan shall be administered by a committee (the "Committee")
comprised of at least two (2) members of the Company's Board of Directors who
each shall (a) be a "disinterested person," as defined in Rule 16b-3
promulgated under the Securities Exchange Act of 1934, as amended, (b) have no
financial interest in grants of stock options to officers of the Company under
this Plan and (c) not be an "interested person," as defined in Section 2(a)(19)
of the Investment Company Act of 1940, as amended (the "Act"), of the Company.
The Committee shall interpret this Plan and, to the extent and in the manner
contemplated herein, shall exercise the discretion reserved to it hereunder.
The Committee may prescribe, amend and rescind rules and regulations relating
to this Plan and to make all other determinations necessary for its
administration.  The decision of the Committee on any interpretation of this
Plan or administration hereof, if in compliance with the provisions of the Act
and regulations promulgated thereunder, shall be final and binding with respect
to the Company, any optionee or any person claiming to have rights as, or on
behalf of, any optionee.

3.  SHARES SUBJECT TO THE PLAN

            The shares subject to option and the other provisions of this Plan
shall be shares of the Company's common stock, par value $1.00 per share
("shares").  Subject to the provisions hereof concerning adjustment, the total
number of shares which may be purchased upon the exercise or surrender of stock
options granted under this Plan shall not exceed 1,200,000 shares, which
includes all shares with respect to which options have been granted or
surrendered for payment in cash or other consideration pursuant to this Plan or
predecessor forms of this Plan.  In the event any option shall cease to be
exercisable in whole or in part for any reason, the shares which were covered
by such option, but as to which the option had not been exercised, shall again
be available under this Plan.  Shares may be made available from authorized,
unissued or reacquired stock or partly from each.

4.  PARTICIPANTS

            (a) Officers.  The Committee shall determine and designate from
time to time those key officers of the Company who shall be eligible to
participate in this Plan.  The Committee shall also determine the number of
shares to be offered from time to time to each optionee.  In making these
determinations, the Committee shall take into account the past service of each
such officer to the Company, the present and potential contributions of such
officer to the success of the Company and such other factors as the Committee
shall deem relevant in connection with accomplishing the purposes of this Plan;
provided that





                                       1
<PAGE>   2
the Committee shall determine that each grant of options to an optionee, the
number of shares offered thereby and the terms of such option are in the best
interests of the Company and its shareholders.  The date on which the Committee
approves the grant of an option to an officer of the Company shall be the date
of issuance of such option; provided, however, that if (1) any such action by
the Committee does not constitute approval thereof by both (A) a majority of
the Company's directors, who each has no financial interest in such action and
(B) a majority of the Company directors who each is not an "interested person"
[as defined in Section 2(a)(19) of the Act] of the Company and (2) such
approval is then required by Section 61(a)(3)(B)(i)(I) of the Act, then the
grant of any option by such action shall not be effective, and there shall be
no issuance of such option, until there has been approval of such action by (A)
a majority of the Company's directors who each has no financial interest in
such action and (B) a majority of the Company's directors who each is not an
"interested person" of the Company, on the basis that such action is in the
best interests of the Company and its shareholders, and the last date on which
such required approval is obtained shall be the date of issuance of such
option.  The agreement documenting the award of any option granted pursuant to
this paragraph 4(a) shall contain such terms and conditions as the Committee
shall deem advisable, including but not limited to being exercisable only in
such installments as the Committee may determine.

            (b) Non-Officer Directors.  A one-time grant of options in
accordance with the provisions of this paragraph (b) shall be made to each
director of the Company who is not an officer of the Company or of the
Company's investment adviser (a "non-officer director") who is serving at the
later of (i) the date on which the proposal to make grants of options to
non-officer directors is approved by the shareholders of the Company or (ii)
the date on which the issuance of options pursuant to this Plan to non-officer
directors is approved by order of the Securities and Exchange Commission
pursuant to Section 61(a)(3)(B)(i)(II) of the Act.  After the later of such
dates, a one-time grant of options in accordance with the provisions of this
paragraph (b) shall be made to each non-officer director [other than any
non-officer director who received a grant pursuant to the first sentence of
this paragraph (b)] upon his or her initial election as a director of the
Company.  Each grant pursuant to this paragraph (b) shall award the non-officer
director an option to purchase ten thousand (10,000) shares at a price equal to
the current fair market value of the shares at the date of issuance of such
option; provided, that if any non-officer director then holds ten percent (10%)
or more of the outstanding shares, the exercise price of such option shall not
be less than one hundred ten percent (110%) of such current fair market value.
The agreement documenting the award of any option granted pursuant to this
paragraph 4(b) shall contain such terms and conditions as the Committee shall
deem advisable; provided, however, that any such option shall vest in three
annual installments (so that the recipient can first exercise the option with
respect to not more than 3,333 shares on or after the date of issuance of such
option, can exercise the option with respect to not more than an additional
3,333 shares on or after the first anniversary of the date of issuance of such
option and can exercise such option with respect to the all of the shares
covered thereby on or after the second anniversary of the date of issuance of
such option).

            (c) General.  Agreements evidencing options granted to different
optionees or at different times need not contain similar provisions.

5.  OPTION PRICE

            Shares shall be optioned from time to time at a exercise price not
less than the current fair market value [as defined in paragraph 15(d) of this
Plan] of the shares at the date of issuance of such option; provided, that the
exercise price of any option granted to a holder of 10% or more of the
Company's shares shall not be less than 110% of such current fair market value.

6.  OPTION PERIOD





                                      2
<PAGE>   3

            Each option agreement shall state the period or periods of time
within which the subject option may be exercised, in whole or in part, by the
optionee which shall be such period or periods of time as may be determined by
the Committee; provided, that the option period shall not exceed ten years from
the date of issuance of the option and shall not exceed five years if the
option is granted to a holder of 10% or more of the Company's shares.

7.  PAYMENT FOR SHARES

            Full payment for shares purchased shall be made at the time of
exercising the option in whole or in part.  Payment of the purchase price shall
be made in cash (including check, bank draft or money order) or, if authorized
pursuant to paragraph 9 hereof, by a loan from the Company in accordance with
paragraph 9.

8.  TRANSFERABILITY OF OPTIONS

            Options shall not be transferable other than by will or the laws of
descent and distribution, and during an optionee's lifetime shall be
exercisable only by the optionee.

9.  LOANS BY THE COMPANY

            Upon the exercise of any option by an officer-optionee, the
Company, at the request of the officer-optionee, and subject to the approval of
both (a) a majority of the Company's directors who each has no financial
interest in such loan and (b) a majority of the Company's directors who each is
not an "interested person" [as defined in Section 2(a)(19) of the Act] of the
Company on the basis that such loan is in the best interests of the Company and
its stockholders (whether such approval is by the Committee or otherwise), may
lend to such officer-optionee, as of the date of exercise, an amount equal to
the exercise price of such option; provided, that such loan (a) shall have a
term of not more than ten years, (b) shall become due within sixty days after
the recipient of the loan ceases to be an officer of the Company, (c) shall
bear interest at a rate no less than the prevailing rate applicable to 90-day
United States Treasury bills at the time the loan is made, and (d) shall be
fully collateralized at all times, which collateral may include securities
issued by the Company.  Loan terms and conditions may be changed by the
Committee to comply with applicable IRS and SEC regulations.

10.  TERMINATION OF OPTION

            All rights to exercise options shall terminate sixty days after any
optionee ceases to be a director or an officer of the Company for any cause
other than death or total and permanent disability.

11.  RIGHTS IN THE EVENT OF TERMINATION OF SERVICE

            If an optionee's service as a director or officer is terminated for
any reason other than death or total and permanent disability prior to
expiration of his or her option and before such option is fully exercised, the
optionee shall have the right to exercise the option during the balance of the
60-day period referred to in paragraph 10.

12.  RIGHTS IN THE EVENT OF TOTAL AND PERMANENT DISABILITY OR DEATH

            If an optionee becomes totally and permanently disabled or dies
prior to expiration of the option without having fully exercised it, he or the
executors or administrators or legatees or distributees of the estate, as the
case may be, shall, have the right, from time to time within one year after the
optionee's total





                                       3
<PAGE>   4
and permanent disability or death and prior to the expiration of the term of
the option, to exercise the option in whole or in part, as provided in the
respective option agreement.


13.  EFFECT OF CHANGE IN STOCK SUBJECT TO THE PLAN

            Subject to any required action by the shareholders of the Company
and the provisions of applicable corporate law, the number of shares of
represented by the unexercised portion of an option, the number of shares which
has been authorized or reserved for issuance hereunder, and the number of
shares covered by any applicable vesting schedule hereunder, as well as the
exercise price of a share represented by the unexercised portion of an option,
shall be proportionately adjusted for (a) a division, combination or
reclassification of any of the shares of common stock of the Company or (b) a
dividend payable in shares of common stock of the Company.

14.  GENERAL RESTRICTION

            Each option shall be subject to the requirement that, if at any
time the Board of Directors shall determine, at its discretion, that the
listing, registration or qualification of the shares subject to such option
upon any securities exchange or under any state or federal law, or the consent
or approval of any government regulatory body, is necessary or desirable as a
condition of, or in connection with, the granting of such option or the issue
or purchase of the shares thereunder, such option may not be exercised in whole
or in part unless such listing, registration, qualification, consent or
approval shall have been effected or obtained free of any conditions not
acceptable to the Company.  Subject to the limitations of paragraph 6, no
option shall expire during any period when exercise of such option has been
prohibited by the Board of Directors, but shall be extended for such further
period so as to afford the optionee a reasonable opportunity to exercise his
option.

15.  MISCELLANEOUS PROVISIONS

            (a) No optionee shall have rights as a shareholder with respect to
shares covered by his option until the date of exercise of his option.

            (b) The granting of any option shall not impose upon the Company
any obligation to appoint or to continue to appoint as a director or officer
any optionee, and the right of the Company to terminate the employment of any
officer or other employee, or service of any director, shall not be diminished
or affected by reason of the fact that an option has been granted to such
optionee.

            (c) Options shall be evidenced by stock option agreements in such
form and subject to the terms and conditions of this Plan as the Committee
shall approve from time to time, consistent with the provisions of this Plan.
Such stock option agreements may contain such other provisions as the Committee
in its discretion may deem advisable.

            (d) For purposes of this Plan, the fair market value of the shares
shall be the closing sales price of the stock as quoted on the National
Association of Securities Dealers Automated Quotation System for the date of
issuance of such option, as provided herein.  If the Company's shares are
traded on an exchange, the price shall be the closing price of the Company's
stock as reported in The Wall Street Journal for such date of issuance of an
option.

            (e) The aggregate fair market value (determined as of the date of
issuance of an option) of the shares with respect to which an option, or
portion thereof, intended to be an incentive stock option is exercisable





                                       4
<PAGE>   5
for the first time by any optionee during any calendar year (under all
incentive stock option plans of the Company and subsidiary corporations) shall
not exceed $100,000.

            (f) All options issued pursuant to this Plan shall be granted
within ten years from the earlier of the date of adoption of this Plan (or any
amendment thereto requiring shareholder approval pursuant to the Code) or the
date this Plan (or any amendment thereto requiring shareholder approval
pursuant to the Code) is approved by the shareholders of the Company.

            (g) No option may be issued if exercise of all warrants, options
and rights of the Company outstanding immediately after issuance of such option
would result in the issuance of voting securities in excess of 20% of the
Company's outstanding voting securities.

            (h) A leave of absence granted to an employee does not constitute
an interruption in continuous employment for purposes of this Plan as long as
the leave of absence does not extend beyond one year.

            (i) Any notices given in writing shall be deemed given if delivered
in person or by certified mail; if given to the Company at Allied Capital
Corporation II, 1666 K Street, N.W., 9th Floor, Washington, D.C. 20006; and, if
to an optionee, in care of the optionee at his or her last known address.

            (j) This Plan and all actions taken by those acting under this Plan
shall be governed by the substantive laws of Maryland without regard to any
rules regarding conflict-of-law or choice-of-law.

            (k) All costs and expenses incurred in the operation and
administration of this Plan shall be borne by the Company.

16.  AMENDMENT AND TERMINATION

            The Board of Directors may modify, revise or terminate this Plan at
any time and from time to time; provided, however, that no modification or
revision of any material provision of this Plan may be made without shareholder
approval except for such modifications or revisions which are necessary in
order to ensure the options issued as incentive stock options under this Plan
comply with Section 422 or any successor provision of the Code, applicable
provisions of the Act or any exemptive order therefrom issued to the Company in
connection with this Plan, Rule 16b-3 promulgated under the Securities Exchange
Act of 1934, as amended, or other applicable law.  This Plan shall terminate
when all shares reserved for issuance hereunder have been issued upon the
exercise of options, by action of the Board of Directors pursuant to this
paragraph, or on February 17, 2004, whichever shall first occur.

17.  EFFECTIVE DATE OF THE PLAN

            This Plan shall become effective upon (1) adoption by the Board of
Directors and (2) approval of this Plan by the shareholders of the Company.

18.  AMENDMENT HISTORY                                        
<TABLE>
<CAPTION>
      <S>                                                             <C>
      Date of plan adoption by the Board of Directors                 February 15, 1990
      Date of plan approval by shareholders                           May 17, 1990     
      Date of plan amendment adoption by the Board of Directors       January 23, 1992
      Date of plan amendment adoption by the Board of Directors       February 18, 1993
      Date of plan amendment approval by shareholders                 May 13, 1993
      Date of plan amendment adoption by the Board of Directors       February 17, 1994
      Date of plan amendment approval by shareholders                 May 12, 1994
      Date of approval by Securities and Exchange Commission          December 26, 1995
      Date of plan amendment adoption by the Board of Directors       February 14, 1996
</TABLE>





                                       5