1
                                                                     EXHIBIT 4.5

                              MEDFORD BANCORP, INC.

                                STOCK OPTION PLAN

                             As Amended and Restated
                               as of July 29, 1997
                               -------------------

1. PURPOSE

     This Stock Option Plan (the "Plan") is a continuation of the Medford
Savings Bank 1993 Stock Option Plan and is intended as a performance incentive
for directors, officers and full-time employees of Medford Bancorp, Inc. (the
"Company") or its Subsidiaries (as hereinafter defined) to enable the persons to
whom options are granted (the "Optionees") to acquire or increase a proprietary
interest in the success of the Company. The Company intends that this purpose
will be effected by the granting of "incentive stock options" ("Incentive
Options") as defined in Section 422 of the Internal Revenue Code of 1986, as
amended from time to time (the "Code") and nonqualified stock options
("Nonqualified Options") under the Plan. The term "Subsidiaries" includes any
corporations in which stock possessing 50 percent or more of the total combined
voting power of all classes of stock is owned directly or indirectly by the
Company.

2. OPTIONS TO BE GRANTED AND ADMINISTRATION

     (a) Options granted under the Plan may be either Incentive Options or
Nonqualified Options.

     (b) The Plan shall be administered by a committee (the "Option Committee")
of not less than three directors of the Company appointed by the Board of
Directors of the Company. None of the members of the Option Committee shall be
an officer or other full-time employee of the Company. It is the intention of
the Company that each member of the Option

                                        1


   2



Committee shall be a "non-employee director," as that term is defined and
interpreted under Rule 16b-3(b)(3)(i) or any successor rule promulgated by the
Securities and Exchange Commission under the Securities Exchange Act of 1934, as
amended (the "1934 Act"). Action by the Option Committee shall require the
affirmative vote of a majority of all its members.

     (c) Subject to the terms and conditions of the Plan, the Option Committee
shall have the power:

          (i) To determine from time to time the options to be granted to
     eligible persons under the Plan (except with respect to options granted to
     non-employee directors pursuant to Section 4(d) hereof) and to prescribe
     the terms and provisions (which need not be identical) of each option
     granted under the Plan to such persons;

          (ii) To construe and interpret the Plan and options granted thereunder
     and to establish, amend, and revoke rules and regulations for
     administration of the Plan. In this connection, the Option Committee may
     correct any defect or supply any omission, or reconcile any inconsistency
     in the Plan, or in any option agreement, in the manner and to the extent it
     shall deem necessary or expedient to make the Plan fully effective. All
     decisions and determinations by the Option Committee in the exercise of
     this power shall be final and binding upon the Company and the Optionees;
     and

          (iii) Generally, to exercise such powers and to perform such acts as
     are deemed necessary or expedient to promote the best interests of the
     Company with respect to the Plan.

                                        2


   3



3. STOCK

     (a) The stock subject to the options granted under the Plan shall be shares
of the Company's authorized but unissued common stock, par value $0.50 per share
(the "Common Stock"). The total number of shares that may be issued pursuant to
options or stock appreciation rights granted under the Plan shall not exceed an
aggregate of 200,000 shares of Common Stock. Such number shall be subject to
adjustment as provided in Section 8 hereof.

     (b) Whenever any outstanding option under the Plan expires, is canceled or
is otherwise terminated (other than by exercise), the shares of Common Stock
allocable to the unexercised portion of such option may again be the subject of
options under the Plan, except for options surrendered as provided in Section 7
hereof. 

4. ELIGIBILITY

     (a) Incentive Options may be granted only to officers and other full-time
employees of the Company or its Subsidiaries, including members of the Board of
Directors who are also employees of the Company or its Subsidiaries.
Nonqualified Options may be granted to officers or other full-time employees of
the Company or its Subsidiaries and to members of the Board of Directors of the
Company or Medford Savings Bank (the "Bank") (including non-employee directors,
on and subject to the terms and conditions set forth in Section 4(d)).

     (b) No person shall be eligible to receive any option under the Plan, if at
the date of grant such person beneficially owns in excess of ten percent of the
outstanding Common Stock of the Company.

     (c) The aggregate fair market value, determined at the time the option is
granted, of the stock with respect to which Incentive Options under the Plan and
incentive stock options

                                        3


   4



under any other option plan of the Company (or a parent or subsidiary as defined
in ss.424 of the Code) granted after December 31, 1986 are exercisable for the
first time by any individual during any calendar year shall not exceed $100,000.
Any option granted in excess of the foregoing limitations shall be clearly and
specifically designated as not being an Incentive Option.

     (d) Each non-employee director of the Company or the Bank who is elected or
reelected to the Board of Directors of the Company and the Bank shall
automatically be granted, upon each such election or reelection, a Nonqualified
Option to purchase 2,000 shares of Common Stock; provided, however, that no
non-employee director of both the Company and the Bank may be granted a
Nonqualified Option to purchase more than 2,000 shares of Common Stock at any
election or reelection. Such option shall vest as follows: 1,000 shares upon
election or reelection to the Board of Directors and 1,000 shares on the first
anniversary of such election or reelection. No options granted to non-employee
directors may be exercisable more than ten years from the date of grant. Except
as provided in this Section 4(d), the terms of such options, including without
limitation the purchase price per share of Common Stock thereunder, shall be
determined as set forth in Section 5 hereof. Notwithstanding any other
provisions of the Plan, the provisions of this Section 4(d) shall govern the
rights and obligations of the Company and non-employee directors in respect of
options granted or to be granted to non-employee directors.

5. TERMS OF THE OPTION AGREEMENTS

     Each option agreement shall contain such provisions as the Option Committee
shall from time to time deem appropriate. Option agreements need not be
identical, but each option

                                        4


   5



agreement by appropriate language shall include the substance of all of the
following provisions:

     (a) EXPIRATION. Notwithstanding any other provision of the Plan or of any
option agreement, each option shall expire on the date specified in the option
agreement, which date shall not be later than the tenth anniversary of the date
on which the option was granted.

     (b) MINIMUM SHARES EXERCISABLE. The minimum number of shares with respect
to which an option may be exercised at any one time shall be 100 shares, or such
lesser number as is subject to exercise under the option at the time.

     (c) EXERCISE.

          (i) Each option shall be exercisable in such installments (which need
     not be equal) and at such times as designated by the Option Committee. To
     the extent not exercised, installments shall accumulate and be exercisable,
     in whole or in part, at any time after becoming exercisable, but not later
     than the date the option expires.

          (ii) In the event of a Change in Control of the Company (as defined in
     (f) or (g) below), all options outstanding as of the date of such Change in
     Control shall become immediately exercisable.

          (iii) The exercise of options granted hereunder shall be subject to
     the receipt of any prior regulatory approvals that may be required.

     (d) PURCHASE PRICE. The purchase price per share of Common Stock under each
option shall be not less than the fair market value of the Common Stock on the
date the option is granted. For the purposes of the Plan, the fair market value
of the Common Stock shall be determined in good faith by the Option Committee;
provided, however, that (i) if the Common

                                        5


   6



Stock is admitted to quotation on the National Association of Securities Dealers
Automated Quotation System ("NASDAQ") on the date the option is granted, fair
market value shall not be less than the average of the highest bid and lowest
asked prices of the Common Stock on such System on such date, or (ii) if the
Common Stock is admitted to trading on a national securities exchange or the
NASDAQ National Market System on the date the option is granted, fair market
value shall not be less than the last sale price reported for the Common Stock
on such exchange on such date or on the last date preceding such date on which a
sale was reported.

     (e) RIGHTS OF OPTIONEES. No Optionee shall be deemed for any purpose to be
the owner of any shares of Common Stock subject to any option unless and until
(i) the option shall have been exercised pursuant to the terms thereof, (ii) the
Company shall have issued and delivered the shares to the Optionee, and (iii)
the Optionee's name shall have been entered as a stockholder of record on the
books of the Company. Thereupon, the Optionee shall have full voting, dividend
and other ownership rights with respect to such shares of Common Stock.

     (f) CHANGE IN CONTROL. For purposes of the Plan, a "Change in Control"
shall be deemed to have occurred in either of the following events: (i) if there
has occurred a change in control which the Bank would be required to report in
response to Item 1 of Form F-3 promulgated under title 12 of the Code of Federal
Regulations ("12 CFR") ss.335.321, or, if such regulation is no longer in
effect, any regulations promulgated by the Federal Deposit Insurance Corporation
which are intended to serve similar purposes, or (ii) when any "person" (as such
term is used in Sections 13(d) and 14(d)(2) of the 1934 Act) becomes a
"beneficial owner" (as such term is defined in Rule 13d-3 promulgated under the
1934 Act), directly or

                                        6


   7



indirectly, of securities of the Bank representing twenty-five percent (25%) or
more of the total number of votes that may be cast for the election of directors
of the Bank, and in the case of either (i) or (ii) above, the Bank's Board of
Directors has not consented to such event by a two-thirds vote of all of the
members of the Board of Directors adopted either prior to such event or within
ninety (90) days thereafter, except that if at the time such a consent vote is
adopted after such change in control, the persons who were directors of the Bank
immediately prior to the change in control do not constitute a majority of the
Board of Directors of the Bank or of any successor institution, such vote shall
not be deemed to constitute consent for purposes of the Plan. In addition, a
Change in Control shall be deemed to have occurred if, as the result of, or in
connection with, any cash tender or exchange offer, merger or other business
combination, sale of assets or contested election, or any combination of the
foregoing transactions, the persons who were directors of the Bank before such
transaction shall cease to constitute a majority of the Board of Directors of
the Bank or of any successor institution.

     (g) CHANGE IN CONTROL. Effective upon the final approval of Medford
Bancorp, Inc. as the holding company of the Bank, Section 5(f) shall cease to
apply and a "Change in Control" shall be deemed to have occurred in any one of
the following events:

          (i) if there has occurred a change in control which the Company would
     be required to report in response to Item 1 of Form 8-K promulgated under
     the 1934 Act, or, if such regulation is no longer in effect, any
     regulations promulgated by the Securities and Exchange Commission pursuant
     to the 1934 Act which are intended to serve similar purposes;

                                        7


   8



          (ii) when any "person" (as such term is used in Sections 13(d) and
     14(d)(2) of the 1934 Act) becomes a "beneficial owner" (as such term is
     defined in Rule 13d-3 promulgated under the 1934 Act), directly or
     indirectly, of securities of the Company or the Bank representing
     twenty-five percent (25%) or more of the total number of votes that may be
     cast for the election of directors of the Company or the Bank, as the case
     may be;

          (iii) during any period of two consecutive years (not including any
     period prior to the execution of this Agreement), individuals who are
     Continuing Directors (as hereinafter defined) cease for any reason to
     constitute at least a majority of the Board of Directors of the Company.
     For this purpose, a "Continuing Director" shall mean (a) an individual who
     was a director of the Company at the beginning of such period or (b) any
     new director (other than a director designated by a person who has entered
     into an agreement with the Company to effect a transaction described in
     clause (ii), (iv) or (v) of this Section 5(g)) whose election by the Board
     or nomination for election by the Company's stockholders was approved by a
     vote of at least two-thirds (2/3) of the directors then still in office who
     either were directors at the beginning of such period or whose election or
     nomination for election was previously so approved;

          (iv) the stockholders of the Company approve a merger of consolidation
     of the Company with any other corporation, other than (a) a merger or
     consolidation which would result in the voting securities of the Company
     outstanding immediately prior thereto continuing to represent (either by
     remaining outstanding or by being converted into voting securities of the
     surviving entity) more than 80% of the combined

                                        8


   9



     voting power of the voting securities of the Company or such surviving
     entity outstanding immediately after such merger or consolidation or (b) a
     merger or consolidation effected to implement a recapitalization of the
     Company (or similar transaction) in which no "person" (as hereinabove
     defined) acquires more than 30% of the combined voting power of the
     Company's then outstanding securities; or

          (v) the stockholders of the Company approve a plan of complete
     liquidation of the Company or an agreement for the sale or disposition by
     the Company of all or substantially all of the Company's assets.

     (h) TRANSFER. No options or stock appreciation rights shall be transferable
by the Optionee other than by will or by the laws of descent and distribution,
and may be exercised during the Optionee's lifetime only by the Optionee, his or
her guardian or legal representative. Notwithstanding the foregoing, the Option
Committee may permit the Optionee to transfer, without consideration for the
transfer, his Nonqualified Option to members of his immediate family, to trusts
for the benefit of such family members, or to partnerships in which such family
members are the only parties, provided that the transferor agrees in writing
with the Company to be bound by all the terms and conditions of this Plan and
the applicable option agreement. 

6. METHOD OF EXERCISE; PAYMENT OF PURCHASE PRICE

     (a) Any option granted under the Plan may be exercised by the Optionee by
delivering to the Option Committee on any business day a written notice
specifying the number of shares of Common Stock the Optionee then desires to
purchase (the "Notice").

                                        9


   10



     (b) Payment for the shares of Common Stock purchased pursuant to the
exercise of an option shall be made either in (i) cash equal to the option price
for the number of shares specified in the Notice (the "Total Option Price"),
(ii) if authorized by the applicable option agreement, shares of Common Stock of
the Company having a fair market value, determined as provided in Section 5(d)
hereof, equal to or less than the Total Option Price, plus cash in an amount
equal to the excess, if any, of the Total Option Price over the fair market
value of such shares of Common Stock, or (iii) by the Optionee delivering the
Notice to the Company together with irrevocable instructions to a broker to
promptly deliver the Total Option Price to the Company in cash or by other
method of payment acceptable to the Company; provided, however, that the
Optionee and the broker shall comply with such procedures and enter into such
agreements of indemnity or other agreements as the Company shall prescribe as a
condition of payment under this clause (iii). 

7. TAX WITHHOLDING

     (a) PAYMENT BY OPTIONEE. Each Optionee shall, no later than the date as of
which the value of any option granted hereunder or of any Common Stock issued
upon the exercise of such option first becomes includable in the gross income of
the Optionee for federal income tax purposes (the "Tax Date"), pay to the
Company, or make arrangements satisfactory to the Company regarding payment of
any federal, state or local taxes of any kind required by law to be withheld
with respect to such income.

     (b) PAYMENT IN SHARES. An Optionee may elect to have such tax withholding
obligation satisfied, in whole or in part, by (i) authorizing the Company to
withhold from shares of Common Stock to be issued pursuant to an option exercise
a number of shares with

                                       10


   11



     an aggregate fair market value (determined by the Option Committee in
     accordance with Section 5(d) as of the date the withholding is effected)
     that would satisfy the withholding amount due, or (ii) transferring to the
     Company shares of Common Stock owned by the Optionee with an aggregate fair
     market value (determined by the Option Committee in accordance with Section
     5(d) as of the date the withholding is effected) that would satisfy the 

8. STOCK APPRECIATION RIGHTS

     (a) The Option Committee may, but shall not be obligated to, include stock
appreciation rights in any option agreement, on such terms and conditions as it
deems appropriate in each case. Such stock appreciation rights shall permit the
Optionee, at his or her election, to surrender to the Company the right to
exercise such option (or portion thereof) in consideration for the payment by
the Company of an amount equal to the excess of the fair market value on the
date of such surrender of the shares of Common Stock subject to such option (or
portion thereof) surrendered over the exercise price of such shares. Such
payment may be made, at the discretion of the Option Committee upon the request
of the Optionee, in shares of Common Stock valued at the fair market value
thereof on the date of such surrender or in cash, or any combination thereof.

     (b) No stock appreciation right may be exercised within six months from the
date of grant thereof, except that this limitation shall not apply in the event
death or disability of the grantee occurs prior to the expiration of such six
month period.

     (c) Any option surrendered as provided in this Section 8 shall be canceled
by the Company and shall not be subject to further grant.

                                       11


   12



     (d) The Option Committee shall be authorized hereunder to make payment to
the Optionee in shares of Common Stock only if Sections 61 and 83 of the Code
apply to the Common Stock transferred to the Optionee. 

9. ADJUSTMENT UPON CHANGES IN CAPITALIZATION

     (a) If the shares of the Company's Common Stock as a whole are increased,
decreased, changed into or exchanged for a different number or kind of shares or
securities of the Company, whether through merger, consolidation,
reorganization, recapitalization, reclassification, stock dividend, stock split,
combination of shares, exchange of shares, change in corporate structure or the
like, an appropriate and proportionate adjustment, in the discretion of the
Option Committee, shall be made in the number and kind of shares subject to the
Plan, and in the number, kind, and per share exercise price of shares subject to
unexercised options or portions thereof granted prior to any such change. In the
event of any such adjustment in an outstanding option, the Optionee thereafter
shall have the right to purchase the number of shares under such option at the
per share price, as so adjusted, which the Optionee could purchase at the total
purchase price applicable to the option immediately prior to such adjustment.

     (b) Adjustments under this Section 9 shall be determined by the Option
Committee and such determinations shall be conclusive. The Option Committee
shall have the discretion and power in any such event to determine and to make
effective provision for acceleration of the time or times at which any option or
portion thereof shall become exercisable. No fractional shares of Common Stock
shall be issued under the Plan on account of any adjustment specified above.

                                       12


   13



10. EFFECT OF CERTAIN TRANSACTIONS

     In the case of (i) the dissolution or liquidation of the Company, (ii) a
reorganization, merger or consolidation in which the Company is acquired by
another entity or in which the Company is not the surviving corporation, or
(iii) the sale of all or substantially all of the property of the Company to
another corporation, the Plan and the options issued hereunder shall terminate,
unless provision is made in connection with such transaction for the assumption
of options theretofore granted, or the substitution for such options of new
options of the successor corporation or parent thereof, with appropriate
adjustment as to the number and kind of shares and the per share exercise
prices, as provided in Section 9. In the event of such termination, all
outstanding options shall be exercisable in full for at least 15 days prior to
the date of such termination whether or not otherwise exercisable during such
period.

11. RELEASE OF FINANCIAL INFORMATION

     A copy of the Company's annual report to stockholders shall be delivered to
each Optionee at the time such report is distributed to the Company's
stockholders. Upon request, the Company shall furnish to each Optionee a copy of
its most recent annual report and each quarterly report and current report filed
under the 1934 Act since the end of the Company's prior fiscal year.

12. AMENDMENT OF THE PLAN

     The Board of Directors of the Company may amend and make such changes in
and additions to the Plan as it may deem proper and in the best interest of the
Company, subject to stockholder approval, if required by law; provided, however,
that no such action shall affect or impair any options theretofore granted under
the Plan.

                                       13


   14



13. NONEXCLUSIVITY OF THE PLAN

     Neither the adoption of the Plan by the Board of Directors nor the
submission of the Plan to the stockholders of the Company for approval shall be
construed as creating any limitations on the power of the Board of Directors to
adopt such other incentive arrangements as it may deem desirable, including,
without limitation, the granting of stock options otherwise than under the Plan,
and such arrangements may be either applicable generally or only in specific
cases. The Plan shall not be deemed to confer upon any employee of the Company
or any Subsidiary any right to continued employment. 

14. GOVERNMENT AND OTHER REGULATIONS; GOVERNING LAW

     (a) The obligation of the Company to sell and deliver shares of Common
Stock with respect to options granted under the Plan shall be subject to all
applicable laws, rules and regulations, including all applicable federal and
state securities laws, and the obtaining of all such approvals by governmental
agencies as may be deemed necessary or appropriate by the Option Committee.

     (b) The Plan shall be governed by Massachusetts law, except to the extent
that such law is preempted by federal law.

     (c) Transactions under the Plan are intended to comply with Rule 16b-3
under the 1934 Act or any successor rule. Any provision of the Plan inconsistent
with such Rule shall be inoperative and shall not affect the validity of the
Plan or the exemption from Section 16(b) of the 1934 Act provided thereunder.

                                       14


   15


15. EFFECTIVE DATE OF PLAN; STOCKHOLDER APPROVAL

     The Plan became effective in 1993 upon the approval of the stockholders in
accordance with applicable laws and regulations. No option may be granted under
the Plan after the tenth anniversary of the effective date of the Plan.

     The restatement of this Plan shall become effective as of July 29, 1997,
provided, however, that all references to Medford Bancorp, Inc., the Company,
shall become effective only upon the final approval of Medford Bancorp, Inc. as
the holding company of Medford Savings Bank.








                                       15