<PAGE>

                                                              Exhibit 10.5
                                                              ------------



                              CONSULTING AGREEMENT
                              --------------------

                  THIS CONSULTING AGREEMENT ("Agreement") is made and entered
into as of the ___ day of ______________, 2001 by and between COMMUNITY BANK,
N.A., a national banking association having its executive offices at
_________________________ ("Bank") and WILLIAM M. DAVIS, residing at
___________________________ ("Consultant").

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

                  WHEREAS, pursuant to an Agreement and Plan of Merger between
Community Bank System, Inc. (the "Corporation") and First Liberty Bank Corp.,
(the "Seller"), dated November 29, 2000 (the "Agreement and Plan of Merger"),
the Corporation and the Seller have agreed to a merger of the Seller with the
Corporation effective as of the closing date specified in the Agreement and Plan
of Merger (the "Closing Date), and a merger of First Liberty Bank & Trust, a
wholly-owned subsidiary of the Seller ("First Liberty Bank"), with the Bank; and

                  WHEREAS, the Consultant is an executive of the Seller and
First Liberty Bank and is familiar with their business, operations and
properties and has extensive banking experience in the market areas served by
First Liberty Bank; and

                  WHEREAS, Consultant is presently a party to an amended and
restated employment agreement with First Liberty Bank, dated October 25, 2000
(the "First Liberty Employment Agreement"); and

                  WHEREAS, in connection with the merger of First Liberty Bank
with and into the Bank as contemplated by the Agreement and Plan of Merger, the
consultant will receive the benefits and payments provided for under Section 6
of the First Liberty Employment Agreement, and will cease to be an executive
officer of Seller and First Liberty Bank; and

                  WHEREAS, for purposes of facilitating a smooth transition in
ownership and control and an effective consolidation of the operations of First
Liberty Bank with those of the Bank and the promotion of the Bank in the market
areas served by First Liberty Bank, the Bank
<PAGE>

wishes to secure for itself the services of the Consultant for a period
following the Closing Date; and

                  WHEREAS, the Consultant is willing to make his services
available to the Bank on the terms and conditions hereinafter set forth;

                  NOW, THEREFORE, the Bank and the Consultant hereby agree as
follows:

                  Section 1.  Engagement, Period of Engagement.
                              --------------------------------

                  The Bank offers to engage the Consultant, and the Consultant
hereby accepts such engagement, to provide services to the Bank as a consultant
for a period of three (3) years beginning on the Closing Date and ending on the
day immediately preceding the third anniversary of the Closing Date ("Period of
Engagement").

                  Section 2.  Extent of Services
                              ------------------

                  During the Period of Engagement, the Consultant shall hold
himself available to perform such services in connection with the ownership,
maintenance and operation of the businesses acquired by the Bank pursuant to the
Agreement and Plan of Merger and the other businesses of the Bank and its
affiliates as the Bank may reasonably request. The services which may be
required of the Consultant hereunder may include, but are not limited to,
assisting the Bank in the conversion of the First Liberty Bank's data processing
system to the Bank's data processing system; assisting in the conversion of'
branch offices to branch offices of the Bank; assisting in the integration of
First Liberty Bank's employees with those of the Bank; preserving the franchise
of First Liberty Bank by promoting the Bank and its products and services in
communities previously served by First Liberty Bank; promoting the recognition
and acceptance of the Bank as the successor of First Liberty Bank among First
Liberty Bank's customers; and advising and assisting the Bank with acquisition
opportunities in communities previously served by First Liberty Bank. Such
services may be called upon for not less than forty (40), and not more than
sixty (60), hours per month during the Period of Engagement. The Bank may, in
its sole and absolute discretion, engage other employees or independent
contractors to perform any or all of the services for which the Consultant is
available under the terms of this Agreement. Subject to the provisions of
Section 5 and Section 6, the Consultant may perform services, as an

                                       2
<PAGE>

employee or independent contractor, other than for the Bank; provided, however,
that the Consultant also performs the services required of him hereunder.

     Section 3.  Compensation.
                 ------------

     (a) In consideration for the availability of the Consultant's services
hereunder, as well as for any services to be provided hereunder, the Bank shall
pay to the Consultant a retainer at the annual rate of ONE HUNDRED THOUSAND
DOLLARS ($100,000.00), payable in advance in equal monthly installments, the
first such installment to be paid on the Closing Date and each succeeding
installment to be paid on the first business day of each succeeding calendar
month until a total of thirty-six (36) such payments have been made; provided,
however, that no payment shall be made for any month after the month in which
this Agreement terminates as provided in Section 7. Such retainer shall
constitute the sole and exclusive compensation to which the Consultant is or may
become entitled hereunder. Without limiting the generality of the foregoing, the
Consultant shall have no right by virtue of his performance of services pursuant
to this Agreement to participate in, or to receive benefits under, any of the
following plans, programs or arrangements which may be maintained by, or which
may be available for individuals providing services to, the Corporation or the
Bank: any qualified or non-qualified deferred compensation or retirement plan;
any life, health (including hospitalization, medical and major medical),
accident, or disability plan, whether provided through insurance contracts or
otherwise; any stock option, appreciation right, phantom stock or restricted
stock plan or any other equity participation plan; any bonus, incentive, or
other cash compensation program; and any vacation, sick leave, severance pay,
holiday or other fringe benefit program of any name or nature whatsoever.
Consultant expressly waives any right to participate in, or receive benefits
under, all such plans, programs or arrangements. Nothing in this Section 3,
however, shall be deemed to limit or reduce in any manner any of the payments or
benefits due to the Consultant under Section 6 of the First Liberty Employment
Agreement.

     (b) If the Bank shall fail (other than through inadvertence or clerical
error) to pay to the Consultant any monthly payment hereunder on or before the
fifteenth (15th) day of the month for which such payment is due, after ten (10)
days following written notice of such failure is given to the Bank, the
Consultant shall be entitled, upon giving written notice to the Bank, to a
lump-sum payment equal to the aggregate of all payments remaining to be paid for
the remainder of the Period of Engagement in satisfaction of its obligations
under this Section 3 and as advance

                                       3
<PAGE>

payment against the Consultant's availability for, and performance of, services
for the remaining Period of Engagement, subject to Section 3(a). The Consultant
shall be relieved of any duty to hold himself available for services hereunder
until such payment is made, but thereafter shall be bound by Section 2 hereof
until the expiration of the Period of Engagement.

     Section 4.   Expenses.
                  --------

     (a) The Bank shall provide the Consultant with office facilities and
secretarial and other support services at a location within fifteen (15) miles
of Scranton, Pennsylvania at which the Bank maintains an office, to the extent
required for him to perform the consulting services contemplated herein.

     (b) If, in connection with the performance of service hereunder at the
request of the Bank, the Consultant incurs out-of-pocket costs for reasonable
expenses of a type for which the senior executive officers of the Bank would be
reimbursed by the Bank, he shall be entitled to reimbursement therefor by the
Bank in accordance with the standards and procedures in effect from time to time
for expense reimbursements to the Bank's senior executive officers.

     Section 5.  Confidentiality; Nonsolicitation.
                 --------------------------------

     (a) During the Period of Engagement and for a period of thirty-six (36)
months thereafter, the Consultant, except as previously authorized by the Bank
in writing, shall keep confidential and shall refrain from using or disclosing
for the benefit of any person or entity other than the Corporation or the Bank
any document or information obtained in the course of performing services under
the First Liberty Employment Agreement or under this Agreement. The preceding
sentence shall not apply to the use or disclosure of any such document or
information: (i) on or following the date on which such information or document
is first readily ascertainable from public or published information or trade
sources; or (ii) in connection with any judicial or administrative
investigation, inquiry or proceeding to the extent compelled pursuant to
applicable law and as to which, unless expressly prohibited by applicable law,
the Consultant has given advance notice to the Bank.

     (b) The Consultant acknowledges that during the course of his performance
of service for the Bank he may develop or otherwise acquire papers, files or
other records involving or relating to confidential or secret plans, design
information of any kind, devices, material,

                                       4
<PAGE>

research, new product development, customers or customer lists. All such papers,
files and other records shall be the exclusive property of the Bank and shall,
together with any and all copies thereof, be returned to the Bank upon the
earliest to occur of the termination of this Agreement, the expiration of the
Period of Engagement, and a request by the Bank for the return thereof.

     (c) The Consultant hereby covenants and agrees that, during the Period of
Engagement and for a period of thirty-six (36) months thereafter, he shall not,
without the written consent of the Bank, either directly or indirectly:

         (i)  solicit, offer employment to, or take any other action intended,
  or that a reasonable person acting in like circumstances would expect, to have
  the effect of causing any officer or employee of the Bank or any affiliate to
  terminate his or her employment or accept employment or become affiliated
  with, or provide services for compensation in any capacity whatsoever to, any
  entity that directly or indirectly competes with the Bank in any market area
  in which it is then active; or

         (ii) provide any information, advice or recommendation to any officer
  or employee of any entity engaged or to be engaged directly or indirectly in
  the same or competing business with the Bank in any market area in which it is
  then active that is intended, or that a reasonable person acting in like
  circumstances would expect, to have the effect of causing any officer or
  employee of the Bank or any affiliate to terminate his or her employment or
  accept employment or become affiliated with, or provide services for
  compensation in any capacity whatsoever to, such competing entity.

Nothing in this Section 5(c) shall prevent the Consultant from providing
employment references to third parties in response to inquiries not initiated by
him.

     (d) The duties and obligations imposed on the Consultant under this Section
5 are intended to be in addition to, and not in limitation or exclusion of, any
duties and obligations which the Consultant may owe to the Bank under applicable
law. This Section 5 shall be construed and enforced so as to give effect to this
intent.

                                       5
<PAGE>

     Section 6.   Non-Competition.
                  ---------------

     The Consultant agrees that, during the Period of Engagement and for a
period of thirty-six (36) months thereafter, the Consultant shall not, directly
or indirectly, anywhere within the State of New York or the Commonwealth of
Pennsylvania, engage in a business (as principal, partner, director, officer,
agent, employee, consultant, owner, independent contractor or otherwise, with or
without compensation) or hold a financial interest in any organization engaged
in the business of banking (commercial or thrift) or which is otherwise engaged
in competition with Bank or its subsidiaries or affiliates. The foregoing
restriction shall not be construed to prohibit the ownership by the Consultant
of less than five percent (5%) of any class of securities of any corporation
which is engaged in any of the foregoing businesses having a class of securities
registered pursuant to the Securities Exchange Act of 1934, as amended, provided
that such ownership represents a passive investment and that neither the
Consultant or any group of persons including the Consultant in any way, either
directly or indirectly, manages or exercises control of any such corporation,
guarantees any of its financial obligations, otherwise takes part in its
business (other than exercising his rights as a shareholder) or seeks to do any
of the foregoing.

     Section 7.   Termination of Agreement.
                  ------------------------

     This Agreement shall terminate immediately upon the occurrence of any of
the following events: (a) the Consultant's breach of his obligations under
Sections 2, 5, or 6 hereof; (b) the Consultant's death or disability resulting
in his inability to perform his obligations under Section 2 hereof; (c) the
Consultant's election to terminate the Period of Engagement upon thirty (30)
days advance written notice to the Bank; or (d) the Consultant's conviction of a
felony or a determination by an arbitrator in a proceeding contemplated by
Section 18 that the Consultant has been convicted of other illegal conduct
resulting in substantial injury to the Bank or its businesses or reputation.
Following the termination of this Agreement, neither the Bank nor the Consultant
shall have any further obligations hereunder, except for their respective
obligations, if any, under Sections 4, 5, 6, and 8.

                                       6
<PAGE>

     Section 8.   No Employment Relationship Created.
                  ----------------------------------

     The relationship between the Bank and the Consultant shall be that of
client and independent contractor. The Bank shall not assume, and specifically
disclaims, any obligations of an employer to an employee which may exist under
applicable law. The Consultant shall not have any of the rights of an employee
with respect to the Bank, and specifically waives any and all such rights. The
Consultant hereby agrees to take any and all such actions as the Bank may
reasonably request in order to establish that no employment relationship exists
between the parties (except for any such actions as would result in the
termination of this Agreement, and provided that the Consultant shall be
reimbursed for reasonable out-of-pocket expenses incurred by him in connection
therewith). The Consultant shall be treated as an independent contractor for all
purposes of federal, state and local income taxes and payroll taxes.

     Section 9.   Right to Specific Performance.
                  -----------------------------

     The Consultant hereby agrees that any breach of his covenants and
agreements under Sections 5 and 6 will cause irreparable injury to the
Corporation for which the Corporation has no adequate remedy at law. Therefore,
the Consultant agrees that each and every covenant and agreement set forth in
Sections 5 and 6 shall, in addition to and not by way of limitation of any other
remedy which may be available, be specifically enforceable against him by any
party entitled to enforcement thereof in a proceeding described in Section 18
hereof.

     Section 10.  Successors and Assigns.
                  ----------------------

     This Agreement will inure to the benefit of and be binding upon the
Consultant, his legal representatives and testate or intestate distributees, and
the Bank, and their respective successors and assigns, including, in the case of
the Bank, any successor by merger or consolidation or a statutory receiver or
any other person or firm or corporation to which all or substantially all of the
respective assets and business of the Bank may be sold or otherwise transferred.
Notwithstanding the foregoing, the availability of the personal services of the
Consultant is an integral part of this Agreement. The Consultant's duty of
performance hereunder shall not be subject to assignment.

                                       7
<PAGE>

     Section 11.  Notices.
                  -------

     Any communication required or permitted to be given under this Agreement,
including any notice, direction, designation, consent, instruction, objection or
waiver, shall be in writing and shall be deemed to have been given at such time
as it is delivered personally, or five (5) days after mailing if mailed, postage
prepaid, by registered or certified mail, return receipt requested, addressed to
such party at the address listed below or at such other address as one such
party may by written notice specify to the other party:

     If to the Consultant:

             William M. Davis

             ------------------------

             ------------------------

     If to the Bank:

             Community Bank

             ------------------------

             ------------------------

     Section 12.  Severability.
                  ------------

     A determination that any provision of this Agreement, in whole or in part,
is invalid or unenforceable shall not affect the validity or enforceability of
any other provision hereof or of any part of the provision in question not
determined to be unenforceable.

     Section 13.  Waiver.
                  ------

     Failure to insist upon strict compliance with any of the terms, covenants
or conditions hereof shall not be deemed a waiver of such term, covenant, or
condition. A waiver of any provision of this Agreement must be made in writing,
designated as a waiver, and signed by the party against whom its enforcement is
sought. Any waiver or relinquishment of any right or power hereunder at any one
or more times shall not be deemed a waiver or relinquishment of such right or
power at any other time or times.

                                       8
<PAGE>

     Section 14.  Counterparts.
                  ------------

     This Agreement may be executed in two (2) or more counterparts, each of
which shall be deemed an original, and all of which shall constitute one and the
same Agreement.

     Section 15.  Governing Law.
                  -------------

     This Agreement shall be governed by and construed and enforced in
accordance with the laws of the State of New York without giving effect to the
conflict of law principles of such laws.

     Section 16.  Headings and Construction.
                  -------------------------

     The headings of sections in this Agreement are for convenience of reference
only and are not intended to qualify the meaning of any section. Any reference
to a section number shall refer to a section of this Agreement, unless otherwise
stated.

     Section 17.  Entire Agreement; Modifications.
                  -------------------------------

     This instrument contains the entire agreement of the parties relating to
the subject matter hereof, and supersedes in its entirety any and all prior
agreements, understandings or representations relating to the subject matter
hereof, including the First Liberty Employment Agreement, except that this
Agreement shall have no effect on the obligations of the Corporation and the
Bank for the payment and benefits to be provided to the Consultant under Section
6 of the First Liberty Employment Agreement. No modifications of this Agreement
shall be valid unless made in writing and signed by the parties hereto.

     Section 18.  Dispute Resolution.
                  ------------------

     Any controversy or claim arising out of or relating to this Agreement, or
the breach hereof, shall be settled by arbitration in accordance with the
Commercial Rules of the American Arbitration Association and judgment upon the
award rendered by the arbitral tribunal may be entered in any court having
jurisdiction thereof. The arbitration shall be held in Scranton, Pennsylvania,
or at such other place as may be selected by mutual agreement. The arbitration
shall be conducted before a panel of three neutral arbitrators. Within fifteen
(15) days after the commencement of the arbitration, each party shall select one
person to act as arbitrator,

                                       9
<PAGE>

and the two selected shall select a third arbitrator within ten (10) days after
their appointment; if the arbitrators selected by the parties hereto are unable
or fail to agree upon the third arbitrator, the third arbitrator shall be
selected by the President of the American Arbitration Association or his
designee. Either party may, without inconsistency with this Agreement, seek from
a court any interim or provisional relief that may be necessary to protect the
rights or property of that party pending the arbitral tribunal's determination
of the merits of the controversy. Neither party nor the arbitrators may disclose
the existence, content, or results of any arbitration hereunder without the
prior written consent of both parties. The prevailing party shall be entitled to
an award of reasonable attorneys' fees.

     Section 19.  Indemnification.
                  ---------------

     The Bank shall indemnify the Consultant and his heirs, successors and
assigns from and against any and all losses, claims, damages and liabilities to
which the Consultant may become subject under applicable federal or state law,
or otherwise, related to or arising out of the Consultant's performance of
services hereunder. The Bank will not be liable under the foregoing
indemnification provision to the extent that any loss, claim, damage or
liability relates to a claim that the Consultant's performance of his duties
hereunder is a breach of any duty which he owes or is purported to owe to any
other party or results from the Consultant's bad faith, willful misconduct or
negligence or a breach of this Agreement. In the case any action is brought
against the Consultant with respect to which indemnity may be sought against the
Bank under this Agreement, the Consultant shall promptly notify the Bank in
writing and the Bank shall have the right to assume the defense thereof,
including the employment of counsel and the payment of all fees and expenses.

     IN WITNESS WHEREOF, the Bank has caused this Agreement to be executed and
the Consultant has hereunto set his hand all as of the day and year first above
written.

                                      10
<PAGE>

                                         ------------------------------
                                         William M. Davis


                                         COMMUNITY BANK, N.A.
ATTEST:

                                         By:
                                            ---------------------------

                                         Title:
                                               ------------------------

By:
   ---------------------------
         Secretary

                                      11