<PAGE>

                                                                    EXHIBIT 10.4

                         INTERMOUNTAIN COMMUNITY BANCORP
                       RESTRICTED STOCK PURCHASE AGREEMENT

         THIS RESTRICTED STOCK PURCHASE AGREEMENT ("Agreement") is entered into
by and between Intermountain Community Bancorp ("Bancorp") and the Grantee,
named below, on ___________________, __________.

         Grantee:_______________________________________________________________

         Shares:  ________________________ Purchase Price:______________________

         Date of Grant:_________________

This Agreement is subject to the terms and conditions of Bancorp's Second
Amended and Restated Employee Stock Option and Restricted Stock Plan (the
"Plan"). Such terms and conditions are incorporated herein by this reference. In
the event of a conflict between the terms and conditions of this Agreement and
the terms and conditions of the Plan, the terms and condition of the Plan shall
govern.

1.       PURCHASE OF SHARES

         a.       General. In connection with a Restricted Stock Award (as
                  defined in the Plan) that Bancorp has granted to the Grantee,
                  Bancorp offers to sell to the Grantee, for the per share
                  purchase price set forth above (the "Purchase Price"), the
                  number of shares of Bancorp's Common Stock identified above
                  (the " Shares").

         b.       Conditions to Sale of Shares. As a condition precedent to
                  Bancorp's obligation to sell shares under paragraph 1.a, the
                  Grantee shall deliver to Bancorp, within thirty (30) days
                  following the Date of Grant, (i) an original of this Agreement
                  duly executed by the Grantee, and (ii) the aggregate Purchase
                  Price, in cash or cash equivalent; and in the event the
                  Grantee fails to do so, then the rights and obligations of
                  Bancorp and the Grantee hereunder shall terminate without the
                  need for further action by any party, and Bancorp and the
                  Grantee shall have no further rights or obligations with
                  respect to the Restricted Stock Award described in paragraph
                  1.a.

         c.       Issuance of Shares and Delivery of Certificates. Concurrently
                  with the payment by the Grantee of the aggregate Purchase
                  Price, as described in paragraph 1.b, Bancorp shall issue the
                  Shares to the Grantee. All certificates representing the
                  Shares so issued shall be held by the Secretary of Bancorp, as
                  provided in paragraph 3, in escrow.

         d.       Rights Upon Issuance of Shares. Until such time as Bancorp
                  exercises its Repurchase Right (defined below) under this
                  Agreement, and subject to any restrictions contained in the
                  Plan or this Agreement, the Grantee (or his successor

                                       1
<PAGE>

                  in interest) shall have the rights of a stockholder (including
                  voting, dividend and liquidation rights) with respect to the
                  Shares, including Unvested Shares (defined below).

         e.       Vesting Schedule. The Shares shall vest as provided in the
                  vesting schedule set forth below. In no event shall any
                  portion of the Shares vest after the Grantee first ceases to
                  maintain Continuous Status as an Employee (as defined in the
                  Plan). That portion of the Shares that is not vested at the
                  time that the Grantee first ceases to maintain Continuous
                  Status as an Employee (the "Unvested Shares") shall be subject
                  to the Repurchase Right (defined below) of Bancorp, as
                  described in paragraph 2.

<TABLE>
<CAPTION>
Number of Complete Years of Continuous Status as an               Percent of the Original
          Employee From the Date of Grant                       Number of Shares that Vest *
<S>                                                             <C>
                             1                                             25%
                             2                                             25%
                             3                                             25%
                             4                                             25%
</TABLE>

* The number of Shares that vest each year, resulting from multiplying the
original number of Shares by the percentage shown, shall be rounded up to the
nearest whole number, but the total number of Shares that vest over the entire
vesting period shall not exceed, in the aggregate, the total number of Shares
identified in this Agreement above.

2.       REPURCHASE RIGHT

         a.       General. Notwithstanding any provisions contained in this
                  Agreement to the contrary, Bancorp shall have the right, but
                  not the obligation, to repurchase all or any portion of the
                  Unvested Shares (the "Repurchase Right") at the Purchase Price
                  originally paid by the Grantee for such Unvested Shares. Such
                  Repurchase Right shall be exercisable at any time during the
                  ninety (90) day period that immediately follows the date on
                  which Grantee, for any reason, first ceases to maintain
                  Continuous Status as an Employee.

         b.       Exercise of Repurchase Right. If Bancorp elects to exercise
                  the Repurchase Right for all or any portion of the Unvested
                  Shares, it shall do so by delivering a written notice of
                  exercise to the Grantee prior to the expiration of the ninety
                  (90) day period described in paragraph 2.a. Such notice shall
                  specify the number of Unvested Shares that Bancorp will
                  repurchase and the date on which the repurchase is to be
                  effected, which date shall be not more than thirty (30) days
                  after the date of the notice. To the extent that one or more
                  certificates

                                       2
<PAGE>

                  representing Unvested Shares may have been previously
                  delivered out of escrow to the Grantee, the Grantee shall,
                  prior to the close of business on the date specified for the
                  repurchase, deliver to the Secretary of Bancorp the
                  certificates representing the Unvested Shares to be
                  repurchased, each certificate to be properly endorsed for
                  transfer. Bancorp shall, concurrently with the receipt of such
                  stock certificates (either from escrow or from the Grantee as
                  herein provided), pay to the Grantee, in cash or cash
                  equivalents, an amount equal to the Purchase Price originally
                  paid by the Grantee for the Unvested Shares that Bancorp
                  elects to repurchase. If Bancorp does not elect to exercise
                  the Purchase Right for all or any portion of the Unvested
                  Shares, in the manner and within the time period described
                  above, then Bancorp shall cease to have any further Repurchase
                  Right with respect to the Unvested Shares that it does not
                  elect to repurchase (provided, however, that such Shares shall
                  continue to be subject to the right of first refusal described
                  in paragraph 6).

         c.       Additional Shares or Substitute Securities. In the event of a
                  stock dividend, stock split, recapitalization or other change
                  affecting Bancorp's outstanding Common Stock as a class
                  (effected, in each case, without receipt by Bancorp of
                  consideration), then any new, substituted or additional
                  securities or other property (including money paid, other than
                  as a regular cash distribution) that is by reason of such
                  transaction distributed with respect to the Shares shall be
                  immediately subject to the Repurchase Right, but only to the
                  extent that such Shares are at the time Unvested Shares.
                  Appropriate adjustments to reflect the distribution of such
                  securities or property shall be made to the number of Shares
                  at the time subject to the Repurchase Right hereunder, and to
                  the price per share to be paid upon the exercise of the
                  Repurchase Right, in order to reflect the effect of any such
                  transaction upon Bancorp's capital structure; provided,
                  however, that the aggregate Purchase Price shall remain the
                  same.

3.       ESCROW


         a.       Deposit. The Grantee hereby authorizes Bancorp to hold in
                  escrow, in accordance with this paragraph 3, all certificates
                  representing Unvested Shares. In the event any such
                  certificates shall come into the possession of the Grantee,
                  the Grantee shall immediately deliver the same to the
                  Secretary of Bancorp for such purposes. The Grantee further
                  agrees to deliver, at the time any Unvested Shares are issued
                  to him, a duly executed Assignment Separate From Certificate,
                  in the form attached hereto as Exhibit A, to accompany any
                  certificates representing Unvested Shares. The certificates
                  representing Unvested Shares shall remain in escrow until such
                  time or times as they are released or surrendered in
                  accordance with paragraph 3.b.

         b.       Release/Surrender. As to Shares in which the Grantee acquires
                  a vested interest (as described in paragraph 1.e), the
                  certificates representing such Shares shall be released from
                  escrow and delivered to the Grantee as soon as practicable
                  after the Grantee acquires such vested interest. As to Shares
                  that are Unvested Shares at

                                       3
<PAGE>

                  the time that the Grantee first ceases to maintain Continuous
                  Status as an Employee, (i) if Bancorp elects to exercise the
                  Repurchase Right with respect to all or any portion of such
                  Unvested Shares, as provided in paragraph 2, certificates
                  representing the Unvested Shares that Bancorp elects to
                  repurchase shall be delivered to Bancorp, concurrently with
                  the payment to the Grantee, in cash or cash equivalent, of an
                  amount equal to the aggregate Purchase Price for such Unvested
                  Shares, and the Grantee shall cease to have any further rights
                  or claims with respect to such Unvested Shares, and (ii) if
                  Bancorp does not elect to exercise the Purchase Right, as
                  provided in paragraph 2, or elects to exercise the Repurchase
                  Right with respect to less than all of the Unvested Shares,
                  certificates for Unvested Shares that Bancorp does not elect
                  to repurchase shall be delivered to the Grantee, and Bancorp
                  shall cease to have any further Repurchase Right with respect
                  to such Unvested Shares (provided, however, that such Shares
                  shall continue to be subject to the right of first refusal
                  described in paragraph 6).

         c.       Prohibition on Transfer. The Grantee shall not sell, transfer,
                  pledge, hypothecate or otherwise dispose of Unvested Shares,
                  and any such sale, transfer or pledge in violation of this
                  Agreement shall be void. Bancorp shall not be required (i) to
                  transfer on its books any Shares that shall have been sold or
                  transferred in violation of this Agreement, or (ii) to accord
                  any rights (including, without limitation, the right to vote,
                  to receive dividends, or to receive the proceeds of
                  liquidation) to any transferee to whom such Shares shall have
                  been so transferred.

4.       LEGENDS. In order to reflect restrictions on disposition of the
         Unvested Shares, each certificate representing Shares shall be endorsed
         with a legend substantially as follows, in addition to any other
         legends that Bancorp deems to be necessary or advisable:

                  THE SHARES OF STOCK REPRESENTED BY THIS CERTIFICATE ARE
                  SUBJECT TO THE RESTRICTIONS AND RIGHT OF FIRST REFUSAL SET
                  FORTH IN A RESTRICTED STOCK PURCHASE AGREEMENT, DATED
                  _______________, A COPY OF WHICH IS ON FILE AT THE OFFICE OF
                  bancorp AND THE PROVISIONS OF WHICH ARE INCORPORATED HEREIN BY
                  REFERENCE.

5.       SECTION 83(b) ELECTION. The Grantee understands and acknowledges that:

            (i)   Under Section 83 of the Internal Revenue Code of 1986, as
                  amended (the "Code"), the excess of the fair market value of
                  the Shares at the time that any restrictions on the Shares
                  lapse over the Purchase Price for the Shares is taxed, as
                  ordinary income, in the taxable year in which such
                  restrictions lapse. In this context, "restriction" means the
                  right of Bancorp to buy back the Shares pursuant to the
                  Repurchase Right.

            (ii)  If Section 83 of the Code is applicable, the Grantee may file
                  a special election ("Section 83(b) Election") so that the
                  excess of the fair market value of the Shares at the time the
                  Shares are transferred to him/her (rather than the time that
                  any

                                       4
<PAGE>

                  restrictions on the Shares lapse) over the Purchase Price for
                  the Shares is taxed, as ordinary income, in the taxable year
                  in which the Shares are transferred to him/her (rather than
                  the taxable year in which any restrictions lapse). Even if the
                  fair market value of the Shares equals the amount paid for the
                  Shares, the election must be made to avoid adverse tax
                  consequences in the future.

            (iii) The Participation will not be entitled to a deduction for any
                  ordinary income previously recognized as a result of making a
                  Section 83(b) Election, if the Unvested Shares are
                  subsequently forfeited to Bancorp.

            (iv)  If the value of the Unvested Shares declines after a Section
                  83(b) Election, such election may cause the Grantee to
                  recognize more compensation income than he/she would have
                  otherwise recognized.

            (v)   There may be tax reporting, payroll tax and withholding tax
                  requirements relating to the acquisition, and/or the
                  subsequent vesting, of Shares.

            (vi)  THE FORM FOR MAKING A SECTION 83(b) ELECTION IS ATTACHED
                  HERETO AS EXHIBIT B. IF THE GRANTEE CHOOSES TO MAKE SUCH AN
                  ELECTION, THIS FORM MUST BE FILED NO LATER THAN THIRTY (30)
                  DAYS AFTER THE SHARES ARE TRANSFERRED TO HIM. FAILURE TO MAKE
                  A TIMELY SECTION 83(b) ELECTION MAY RESULT IN THE RECOGNITION
                  OF ORDINARY INCOME BY THE GRANTEE AS THE REPURCHASE RIGHT
                  LAPSES. IT IS THE GRANTEE'S SOLE RESPONSIBILITY, AND NOT
                  BANCORP'S, TO MAKE A TIMELY SECTION 83(b) ELECTION.

            (vii) THE GRANTEE IS ADVISED TO SEEK INDEPENDENT ADVICE REGARDING
                  THE APPLICABLE PROVISIONS OF ANY TAX LAWS RELATING TO HIS
                  ACQUISITION OF ANY SHARES.

6.       RIGHT OF FIRST REFUSAL. All Shares acquired by the Grantee pursuant to
         this Agreement shall be subject to the right of first refusal of
         Bancorp described in this paragraph 6.

         a.       In the event the Grantee proposes to sell, assign or otherwise
                  transfer such Shares, after the Shares are no longer Unvested
                  Shares, to any person(s) in a bona fide sale, the Grantee
                  shall submit in writing to Bancorp a notice ("Notice of
                  Proposed Sale") that identifies the number of Shares that the
                  Grantee proposes to sell, the person(s) who proposes to buy
                  such Shares, the sales price for such Shares and all other
                  material terms and conditions of the proposed sale. For a
                  period of thirty (30) days from the date it first receives the
                  Notice of Proposed Sale ("Option Period"), Bancorp shall have
                  the right, but not the obligation, to purchase all, but not
                  less than all, of the Shares that the Grantee proposes to sell
                  at the sales price identified in the Notice of Proposed Sale.

         b.       If Bancorp wishes to exercise the right of first refusal
                  identified in paragraph 6.a to purchase the Shares that the
                  Grantee proposes to sell, it shall give to the

                                       5
<PAGE>

                  Grantee a written notice of exercise to that effect within the
                  Option Period; and the purchase and sale of such Shares shall
                  close within ten (10) days after the time Bancorp gives such
                  written notice. At such closing Bancorp shall pay the sales
                  price, in full, in cash or cash equivalent.

         c.       If Bancorp does not give the notice of exercise described in
                  paragraph 6.b within the Option Period, or if it waives its
                  right of first refusal identified in paragraph 6.a, then the
                  Grantee may sell the Shares identified in the Notice of
                  Proposed Sale to the person, at the sales price and subject to
                  all other terms and conditions identified in such notice;
                  provided, however, that if such sale by the Grantee does not
                  close within thirty (30) days following the expiration of
                  Bancorp's right of first refusal, then the Shares identified
                  in the Notice of Proposes Sale shall again be subject to all
                  the provisions of this paragraph 6.

         d.       Prior to the time that Shares are first sold to any person at
                  fair market value in a bona fide sale, such Shares shall
                  continue to be subject to the restrictions set forth in this
                  paragraph 6, as if the person who proposes to sell those
                  shares were the Grantee.

         e.       All sales, assignments or other transfers of Shares in
                  violation of the right of first refusal of Bancorp described
                  in this paragraph 6 shall be void.

7.       SECURITIES LAW COMPLIANCE. Notwithstanding any contrary provisions of
         this Agreement, the Shares may not be sold, assigned or transferred,
         unless they are registered under applicable Federal and state
         securities laws and regulations or, if the Shares are not then so
         registered, an exemption from such registration is available.

8.       MISCELLANEOUS

         a.       Successors in Interest. This Agreement and all of its terms,
                  conditions and covenants are intended to be fully effective
                  and binding, to the extent permitted by law, on the heirs,
                  executors, administrators, successors and permitted assigns of
                  the parties hereto.

         b.       Spousal Consent. If the Grantee is married, the Grantee shall
                  obtain the signature of the Grantee's spouse as set forth on
                  the Consent of Spouse below. The Grantee's failure to obtain
                  such consent shall constitute a representation by the Grantee,
                  on which Bancorp shall rely, that the Grantee is unmarried and
                  that the Grantee has sole authority with respect to the
                  Grantee's actions regarding the Shares.

         c.       No Right to Employment. Nothing in this Agreement shall affect
                  in any manner whatsoever the right or power of Bancorp to
                  terminate the Grantee's employment with Bancorp, or the
                  Grantee's ability to quit Bancorp's employment, with or
                  without cause, at any time.

                                       6
<PAGE>

         IN WITNESS WHEREOF, the parties have executed this Agreement on the day
and year first indicated above.

GRANTEE:                                 INTERMOUNTAIN COMMUNITY BANCORP,
                                         an Idaho corporation

____________________________________     By:____________________________________

Print Name: ________________________     Title:_________________________________

Address: ___________________________

         ___________________________

         ___________________________

Social Security No._________________

Grantee hereby acknowledges that he have received a copy of the Plan.

__________________________________________

Print Name:_______________________________

                                       7
<PAGE>

                             SPOUSAL ACKNOWLEDGEMENT

         The undersigned spouse of Grantee has read and hereby approves the
foregoing Agreement. In partial consideration of Bancorp granting to Grantee the
right to acquire the Purchased Shares in accordance with the terms of this
Agreement, the undersigned hereby agrees to be irrevocably bound by all the
terms of such Agreement, including, without limitation, the right of the Bancorp
to purchase any Purchased Shares of Grantee pursuant to this Agreement.

_______________________________________________________

Print Name:_______________________________

                                     Address: __________________________________

                                              __________________________________

                                              __________________________________

                                     Social Security No.________________________

                                       8
<PAGE>

                                    EXHIBIT A

                      ASSIGNMENT SEPARATE FROM CERTIFICATE

         FOR VALUE RECEIVED, the undersigned hereby sells, assigns and transfers
unto, ________________________________, ________________________ (_______)
shares of the Common Stock of Intermountain Community Bancorp, an Idaho
corporation, standing in the undersigned's name on the books of said corporation
represented by Certificate No. ____ herewith, and does hereby irrevocably
constitute and appoint ____________ as attorney-in-fact, to transfer the said
stock on the books of the said corporation with full power of substitution in
the premises.

Dated: _____________________, _____

                                       _________________________________________

                                       Print Name:______________________________

                                       9
<PAGE>

                                    EXHIBIT B

                           SECTION 83(b) TAX ELECTION

         The undersigned hereby elects pursuant to Internal Revenue Code Section
83(b) with respect to the property described in paragraph 2 below and supplies
the following information in accordance with the regulations promulgated
thereunder:

1. The name, address and taxpayer identification number of the undersigned are:

         ________________________________
         ________________________________
         ________________________________

         Taxpayer I.D. No._______________

2. Description of property with respect to which the election is being made:

         _____________ shares of Common Stock, no par value, in Intermountain
         Community Bancorp (the "Bancorp"). Such shares were already owned by
         taxpayer at the time the restrictions described in paragraph 4 were
         imposed.

3. Date on which property is transferred and taxable year for which the election
is made:

         The transfer of the property described in paragraph 2 occurred on
         ____________, when the restrictions described in paragraph 4 were
         imposed.

         The taxable year for which this election is made is calendar year
         ___________.

4. The nature of the restriction(s) to which the property is subject is:

         The subject shares are subject to a Restricted Stock Purchase Agreement
         between the shareholder and Bancorp dated ________________, _________
         (the "Purchase Agreement") pursuant to which the shares are subject to
         a right of purchase by Bancorp in the event that the shareholder's
         service to Bancorp is voluntarily terminated or terminated for cause,
         as defined in the Repurchase Agreement. If the right of repurchase is
         exercised, the purchase price is the price originally paid for the
         share by taxpayer. The right of repurchase lapses as to ____________ of
         the original number of shares acquired by taxpayer as the shareholder
         completes each year of continuous service with Bancorp.

         The property is non-transferable in the taxpayer's hands, by virtue of
language to that effect stamped on the stock certificate.

                                       10
<PAGE>

5. Fair market value:

         On the date the restrictions described in paragraph 4 were imposed, the
         shares described in paragraph 2 had a fair market value of
         ________________________.

6. Amount paid for property:

         Taxpayer paid fair market value for the property described in paragraph
2.

7. Furnishing statement to employer:

         A copy of this statement has been furnished to Bancorp, as required by
Reg. Section 1.83(b)-2(d).

Dated:  _____________________.

                                      __________________________________________

                                      Print Name:_______________________________

THIS ELECTION MUST BE FILED WITH THE INTERNAL REVENUE SERVICE CENTER WITH WHICH
TAXPAYER FILES HIS OR HER FEDERAL INCOME TAX RETURNS. THE ELECTION MUST BE FILE
WITHIN THIRTY (30) DAYS AFTER THE TRANSFER OF SHARES TO HIM. THIS FILING SHOULD
BE MADE BY REGISTERED OR CERTIFIED MAIL, RETURN RECEIPT REQUESTED. PURCHASER
MUST RETAIN TWO (2) COPIES OF THE COMPLETED FORM FOR FILING WITH HIS OR HER
FEDERAL AND STATE TAX RETURNS FOR THE CURRENT TAXABLE YEAR AND AN ADDITIONAL
COPY FOR HIS OR HER RECORDS.

                                       11