EXHIBIT 10.5 AMENDED AND RESTATED LIMITED PARTNERSHIP AGREEMENT OF MARRIOTT RESIDENCE INN II LIMITED PARTNERSHIP This Amended and Restated Limited Partnership Agreement (this "Agreement") of Marriott Residence Inn II Limited Partnership, a Delaware limited partnership (the "Partnership"), is made as of August 28, 2002 by and between AHT Res II GP, Inc., a Virginia corporation ("General Partner"), and AHT Res II LP, Inc., a Virginia corporation ("Limited Partner"). RECITALS The General Partner and the Limited Partner (collectively, the "Partners") are each wholly-owned subsidiaries of Apple Hospitality Two, Inc., a Virginia corporation and a real estate investment trust for federal income tax purposes. The Partnership is the surviving entity of a merger with AHT Res II Acquisition, L.P., a Delaware limited partnership, pursuant to a Certificate of Merger filed with the Delaware Secretary of State on August 28, 2002. ARTICLE I DEFINITIONS, PURPOSE AND GENERAL MATTERS 1.1 General Definitions. In addition to terms defined elsewhere in this Agreement, the following terms shall have the meanings indicated below: "Act" shall mean the Delaware Revised Uniform Limited Partnership Act, as it may be amended or replaced from time to time. "Affiliate" means, with respect to any specified Person (a) any Person directly or indirectly controlling, controlled by or under common control with such specified Person, (b) any Person owning or controlling 10% or more of the outstanding voting interests of such specified Person, (c) any Person of which such specified Person owns or controls 10% or more of the voting interests, or (d) any officer, director, general partner, manager or trustee of such specified Person or any Person referred to in clauses (a), (b), and (c) immediately above. For purposes of this definition, "control," when used with respect to any specified Person, means the power to direct the management and policies of such specified Person, directly or indirectly, whether through the ownership of voting securities, by contract or otherwise. The terms "controlling" and "controlled" have meanings correlative to the foregoing. "Internal Revenue Code" shall mean the Internal Revenue Code of 1986, as it may be amended or replaced from time to time. "Loan Documents" means the Loan Agreement dated as of March 22, 1996 between the Marriott Residence Inn II Limited Partnership, as borrower, and Nomura Asset Capital Corporation, as lender, the promissory note evidencing the indebtedness thereunder, the deed of trust and other security documents securing such indebtedness, and all other documents and instruments executed in connection with the foregoing, as the same may be amended or assigned from time to time. "Person" means a natural person, partnership (whether general or limited), trust, estate, association, corporation, limited liability company, unincorporated organization, custodian, nominee or any other individual or entity in its own or any representative capacity. "Properties" shall mean the 23 hotels listed on Exhibit A hereto, consisting of improved real property and related personal property, the full legal description of which is set forth in the Loan Documents. References to a specific provision of the Act or the Internal Revenue Code shall be deemed to refer to any successor provision. 1.2 Purpose. The permitted purpose of the Partnership shall be to engage in any of the following activities: (a) acquiring, owning, operating, managing, developing, selling, exchanging, transferring, leasing, mortgaging, pledging and otherwise dealing with the Properties as permitted by the Loan Documents; (b) merging with other entities or participating in business combinations or acquisitions for the purpose set forth in clause (a) immediately above; and (c) exercising all powers that are enumerated in the Act and are necessary or convenient for the accomplishment of the foregoing. 1.3 Names. The Partnership may conduct its affairs under its own name and under such assumed names as it deems appropriate or convenient. 1.4 Qualifications in Other Jurisdictions. To the extent required by law, the Partnership shall promptly qualify or register to transact business in all jurisdictions other than Delaware in which it transacts business. -2- ARTICLE II SEPARATENESS COVENANTS AND RELATED MATTERS 2.1 Affirmative Covenants. Notwithstanding anything to the contrary contained herein, and for so long as any indebtedness is outstanding under the Loan Documents, the Partnership, and each Partner, hereby agrees that the Partnership shall: (a) maintain its books and records and bank accounts separate from any other Person (except that, for accounting and reporting purposes, the Partnership may be included in the consolidated financial statements of an equity owner of the Partnership in accordance with generally accepted accounting principles); (b) maintain an arm's length relationship with Affiliates and any other party furnishing services to it; (c) maintain its books, records, resolutions and agreements as official records; (d) conduct is business in its own name and through its own authorized officers and agents; (e) prepare and maintain its financial statements, accounting records and other documents separate from those of any other Person (except for inclusion in consolidated financial statements of an equity owner, as described in clause (a) immediately above); (f) pay its own liabilities out of its own funds and other assets; (g) observe all formalities necessary to maintain its identity as an entity separate and distinct from all of its Affiliates; (h) participate in the fair and reasonable allocation, and pay its share, of any and all overhead expenses and other common expenses for facilities, goods or services provided to multiple entities; (i) use its own stationery, invoices and checks (except when acting in a representative capacity, in which event such capacity shall be disclosed); (j) hold and identify itself as a separate and distinct entity under its own name and not as a division or part of any other Person (except for inclusion in consolidated financial statements of an equity owner, as described in clause (a) immediately above); (k) hold its assets in its own name; and (l) maintain adequate capital for the conduct of its business. -3- 2.2 Negative Covenants. Notwithstanding anything to the contrary contained herein, and for so long as any indebtedness is outstanding under the Loan Documents, the Partnership, and each Partner, hereby agrees that the Partnership shall not: (a) seek or consent to any dissolution, winding up, liquidation, consolidation, merger or sale of all or substantially all of its assets; (b) fail to correct any known misunderstanding regarding its separate identity; (c) commingle its funds or other assets with those of any other Person; (d) assume or guarantee or become obligated for the debts of any other Person or hold out its credit as being available to satisfy the obligations of any other Person; (e) acquire obligations or securities of its Partners (other than any note of a Partner held by the Partnership to provide adequate capital for operation of its business); (f) pledge any of its assets for the benefit of any other Person (except as disclosed in accordance with the Loan Documents); (g) make any loans to any other Person; (h) identify its Partners or any of its Affiliates as a division or part of it (except for inclusion in consolidated financial statements of an equity owner); (i) engage (either as transferor or transferee) in any material transaction with any Affiliate other than for fair value and on terms similar to those obtainable in arms-length transactions with unaffiliated parties, or engage in any transaction with any Affiliate involving any intent to hinder, delay or defraud any entity; (j) engage in any business activity or operate for any purpose other than as stated in Section 1.2 above; or (k) without the consent of its General Partner (as granted in accordance with its organizational documents, including any requirements thereof with respect to approval by independent directors), file a bankruptcy or insolvency petition or otherwise institute bankruptcy proceedings. 2.3 Additional Requirements for Partners. So long as any indebtedness is outstanding under the Loan Documents, each Partner which is an entity shall: (a) observe all customary formalities necessary to maintain its identity as an entity separate and distinct from the Partnership and all of its other Affiliates; (b) hold itself out as a separate and distinct entity from the Partnership and not identify the Partnership as a division of the Partner; and -4- (c) not take any action that would cause a violation of the Loan Documents. ARTICLE III MANAGEMENT 3.1 Management Authority. The Partnership shall be managed by the General Partner. The Limited Partner shall not participate in the management of the Partnership or in the control of its business, and shall not have any authority to sign for, or to bind, the Partnership. 3.2 Authorization and Approval. In dealings with the Partnership, a third party may accept the signature of the General Partner as evidence that such dealings are authorized by the Partnership. 3.3 Expenses and Reimbursement. The Partnership shall be responsible for all expenses, costs and liabilities arising from the management, organization or operation of the Partnership in accordance with this Agreement ("Partnership Expenses"). The General Partner shall be entitled to receive prompt reimbursement from the Partnership to the extent, if any, that the General Partner incurs any Partnership Expenses, unless such Partnership Expenses arose from a violation of this Agreement, willful misconduct or a knowing violation of criminal law. 3.4 Compensation. No salaries or other compensation shall be paid by the Partnership to the General Partner for its management services on behalf of the Partnership. ARTICLE IV CAPITAL CONTRIBUTIONS, ACCOUNTS AND RELATED MATTERS 4.1 Capital Contributions. The initial capital contributions made by the Partners to the Partnership are shown on Exhibit B to this Agreement. 4.2 Capital Accounts. The Partnership shall maintain a separate capital account for each Partner (a "Capital Account"). Each Capital Account shall be maintained in accordance with the Internal Revenue Code. 4.3 Allocations and Percentage Interests. The percentage interests of the Partners in the Partnership (and in the income, expenses, profits, losses and assets thereof) shall be proportionate to their respective Capital Accounts. The initial percentage interests of the Partners in the Partnership are shown on Exhibit B to this Agreement. 4.4 Adjustments to Capital Accounts. The Capital Account for a Partner shall be increased by (a) the amount of any cash contributed to the Partnership by such Partner; (b) the value, as agreed upon by the Partnership and such Partner, of any property contributed to the Partnership by such Partner; and (c) any profits of the Partnership allocated to such Partner. The Capital Account for a Partner shall be decreased by all distributions from the Partnership to such Partner and by any losses of the Partnership allocated to such Partner. -5- 4.5 Restrictions on Capital Accounts. The Partners shall have no right to receive interest with respect to their Capital Accounts, to withdraw or borrow money from their Capital Accounts, or to pledge, or otherwise encumber, any part of their Capital Accounts. 4.6 Capital Account Deficits. No Partner shall be responsible for restoring any deficit in such Partner's Capital Account upon the termination of the Partnership or the withdrawal of such Partner from the Partnership in accordance with this Agreement. 4.7 Loans. Any loan from a Partner to the Partnership shall be made on commercially reasonable terms and conditions to the extent permitted by the Loan Documents and shall not be treated as a capital contribution. 4.8 Cash Distributions. Subject to the Loan Documents, the amount and frequency of any cash distributions from the Partnership to the Partners shall be determined from time to time by the General Partner in accordance with this Agreement. ARTICLE V ADMISSION AND WITHDRAWAL OF PARTNERS 5.1 Admission of Additional or Replacement Partners. No person or entity shall be admitted as a new Partner of the Partnership, whether in addition to the existing Partners or in replacement of a Partner or Partners, unless all of the following requirements are satisfied: (a) each Partner must grant prior written consent to the admission of such person or entity as a new Partner; (b) such admission of a Partner must not violate the Loan Documents; and (c) such person or entity must execute a counterpart signature page to this Agreement and must make any required capital contributions to the Partnership in full. Each Partner is entitled to withhold consent to the admission of a new Partner for any reason or no reason. 5.2 Withdrawal. A Limited Partner shall not have the right or the power to withdraw voluntarily from the Partnership at any time or for any reason. A General Partner shall not withdraw voluntarily from the Partnership. Any withdrawal by the General Partner in violation of this Agreement shall result in the following: (a) the General Partner shall be liable for all damages incurred by the Partnership as the direct or indirect result of such withdrawal, including (without limitation) all costs of replacing such General Partner and reasonable legal fees and expenses incurred in enforcing this Agreement; and (b) the amount of such damages may be retained by the Partnership in reduction of any distribution otherwise payable to the General Partner. ARTICLE VI ASSIGNMENTS AND ENCUMBRANCES 6.1 Limitation on Assignments. Each Partner shall be prohibited from assigning, selling, exchanging or otherwise transferring such Partner's interest in the Partnership unless all -6- of the following requirements are satisfied: (a) the proposed transaction applies to the entire interest of such Partner in the Partnership; (b) each other Partner grants prior written consent to the proposed transaction; (c) the prospective transferee agrees to be bound by this Agreement as a Partner; (d) such transaction does not violate the Loan Documents; and (e) the Partnership receives an opinion from its legal counsel, satisfactory to the Partnership in form and substance, confirming that the proposed transaction would not violate any applicable laws, including but not limited to state or federal securities laws, and would not terminate the existence of the Partnership for tax or other purposes. 6.2 Limitation on Encumbrances. Each Partner shall be prohibited from pledging, granting a security interest in, or otherwise encumbering such Partner's interest in the Partnership, or any part thereof, without the prior written consent of each other Partner. 6.3 Strict Compliance and Sole Discretion. Any transaction that is subject to this Article and that fails to comply with its provisions in any way shall be ineffective and void. Each Partner shall be entitled, in such Partner's sole discretion, to withhold consent under this Article for any reason or no reason. ARTICLE VII TAX MATTERS 7.1 Tax Classification. The Partnership shall have a "Tax Matters Partner" in accordance with the Internal Revenue Code. The General Partner shall be the Tax Matters Partner. 7.2 Tax Year. The Partnership shall use the calendar year as its tax year. 7.3 Tax Accounting. The Partnership shall use the same method of accounting for both tax purposes and financial reporting purposes, except as may be required by the Internal Revenue Code. ARTICLE VIII INDEMNIFICATION AND REIMBURSEMENT 8.1 Definitions. As used in this Article, the term "Indemnified Person" means each Partner and (to the extent applicable) each shareholder, employee, director and officer thereof. 8.2 Indemnification. The Partnership shall indemnify and protect each Indemnified Person against any and all claims, liabilities, costs and expenses (including but not limited to reasonable legal fees and costs) arising directly or indirectly from any suit, action, investigation or other proceeding (whether formal or informal) that (a) is brought or threatened against the Indemnified Person; and (b) is based on the acts or omissions of such Indemnified Person on behalf of the Partnership, unless such acts or omissions violated this Agreement, constituted willful misconduct or resulted from a knowing violation of criminal law. The Partnership shall -7- have no obligation to indemnify an Indemnified Person to the extent, if any, that the Indemnified Person is entitled to be indemnified by another source, such as, without limitation, an insurance company. 8.3 Reimbursement. If an Indemnified Person incurs or pays any indemnified cost, the Partnership shall reimburse the Indemnified Person for the full amount of such indemnified cost. Such reimbursement shall be due promptly after the Partnership receives each of the following: (a) a written request for reimbursement from the Indemnified Person; (b) all information necessary to establish the nature and amount of the indemnified cost that was incurred or paid by the Indemnified Person; and (c) a written agreement by the Indemnified Person to repay such reimbursement if the Partnership subsequently determines that the Indemnified Person was not entitled to indemnification, or if the Indemnified Person subsequently receives reimbursement from another source, such as, without limitation, an insurance company. 8.4 Mandatory Subordination. Notwithstanding any provision hereof to the contrary, any indemnification required by this Article shall be fully subordinated to any obligations arising in connection with the Loan Documents and shall not constitute a claim against the Partnership in the event that its cash flow is insufficient to pay such obligations. ARTICLE IX DISSOLUTION 9.1 Events of Dissolution. The Partnership shall dissolve upon, and only upon, the following: (a) the date specified in its Certificate of Limited Partnership; (b) the sale or other transfer of all, or substantially all, of the assets of the Partnership outside the ordinary course of business; (c) the unanimous written consent of the Partners; or (d) any action that requires or results in dissolution under the Act. 9.2 Winding Up of Affairs. Upon dissolution of the Partnership, the General Partner shall wind up the affairs of the Partnership. The General Partner shall determine the time, place, manner and other terms of any sales involving the Partnership's assets, with due regard to the financial condition of the Partnership and the relevant market and economic conditions. No Partner shall have the right to require an in-kind distribution of the assets of the Partnership in lieu of any cash distribution. 9.3 Final Distributions. Upon the winding up of the Partnership, and subject to the requirements of the Act, the General Partner shall distribute the assets of the Partnership in the following order of priority: (a) first, to any creditors of the Partnership, including any Partners who are creditors; (b) second, to known and reasonably estimated costs of dissolution and winding up; -8- (c) third, to any reserves established by the General Partner, in its sole discretion, for contingent liabilities of the Partnership; and (d) fourth, to the Partners, in proportion to the positive balances of their respective Capital Accounts. 9.4 Filing of Certificate of Cancellation. Following the winding up of the Partnership, the General Partner shall be responsible for filing a Certificate of Cancellation on behalf of the Partnership with the Delaware Secretary of State, together with any other documents required to terminate the Partnership and its legal existence. ARTICLE X ADMINISTRATION 10.1 Registered Agent and Office. The Partnership shall continuously maintain a registered agent and registered office in accordance with the Act. The General Partner shall be entitled to change the registered agent and registered office from time to time, in its sole discretion, subject to any requirements of the Act. 10.2 Records. The Partnership shall keep accurate and complete information and records at its principal office, including the information and records set forth in Section 17-305 of the Act. 10.3 Inspection. Upon prior notice to the Partnership of at least two (2) business days, any Partner, and any designated agent or representative of a Partner, shall be granted access to the books and records of the Partnership and shall be entitled, during ordinary business hours, to inspect such books and records and to make copies thereof at the expense of such Partner. ARTICLE XI MISCELLANEOUS PROVISIONS 11.1 Notices. All notices and other communications with respect to this Agreement shall be in writing and shall be delivered, as applicable, to the Partnership at its principal office or to a Partner at the address and/or facsimile number shown in the records of the Partnership. Each notice or other communication that satisfies the requirements set forth above shall be deemed to have been properly given or delivered: (a) on the fifth business day after being mailed by United States certified mail, return receipt requested, postage prepaid; (b) on the day when delivered by hand; (c) on the first business day after being deposited with a national overnight courier; or (d) on the day when transmitted by facsimile with confirmation of receipt or successful transmission. A party to this Agreement may elect to receive notices or communications at a different address by notifying each other party in accordance with the preceding requirements. -9- 11.2 Governing Law. This Agreement shall be interpreted and enforced in accordance with the laws of the State of Delaware, without regard to any provisions or principles relating to choice of law. 11.3 Entire Agreement. This Agreement represents the entire agreement of the parties with respect to the operation, management and governance of the Partnership, and shall supersede all of the Partnership's prior limited partnership agreements. 11.4 Modification and Waiver. Modifications of this Agreement shall not be binding, valid or enforceable unless they are (a) set forth in writing; (b) signed by each of the parties; and (c) not in violation of the Loan Documents. A party may unilaterally waive any of its rights under this Agreement by delivering to each other party a written notice that states the nature and scope of such waiver. 11.5 Severable Provisions. All provisions in this Agreement are severable. Each valid and enforceable provision shall remain in full force and effect, regardless of any determination that is binding upon, or enforceable against, the parties and that declares certain provisions to be invalid or unenforceable. 11.6 Captions. Captions and headings are used in this Agreement for convenience only and shall not affect the interpretation of this Agreement. Terms such as "hereof," "hereby," "hereto," "herein" and "hereunder" shall be deemed to refer to this Agreement as a whole, rather than to any particular provision of this Agreement. 11.7 Binding Effect. This Agreement shall be binding upon, and shall operate to the benefit of, the parties and their permitted assignees and successors in title or interest. 11.8 Counterparts. This Agreement may be executed in counterparts, each of which shall be deemed an original and all of which shall constitute, when taken together, a single instrument. [Next Page is Signature Page] -10- WITNESS the following signatures: GENERAL PARTNER: AHT Res II GP, Inc. By: /s/ J. Philip Hart ------------------ J. Philip Hart Vice President LIMITED PARTNER: AHT Res II LP, Inc. By: /s/ J. Philip Hart ------------------ J. Philip Hart Vice President -11- EXHIBIT A (Residence Inn(R) By Marriott(R) Hotels at the Following Locations) Akron, Ohio Jacksonville, Florida 120 Montrose West Avenue 8365 Dix Ellis Trail Akron, OH 44321 Jacksonville, FL 32256 Arcadia, California Kalamazoo, Michigan 321 East Huntington Drive 1500 East Kilgore Arcadia, CA 91006 Kalamazoo, MI 49001 Birmingham, Alabama Las Vegas, Nevada 3 Greenhill Parkway at U.S. Hwy. 280 3225 Paradise Road Birmingham, AL 35242 Las Vegas, NV 89109 Boca Raton, Florida Lubbock, Texas 525 N.W. 77/th/ Street 2551 South Loop 289 Boca Raton, FL 33487 Lubbock, TX 79423 Boston/Danvers, Massachusetts Memphis, Tennessee 51 Newbury Street- U.S. Route 1 6141 Old Poplar Pike Danvers, MA 01923 Memphis, TN 38119 Charlotte, North Carolina Pensacola, Florida 8503 N. Tryon Street 7230 Plantation Road Charlotte, NC 28262 Pensacola, FL 32504 Chicago/Deerfield, Illinois Philadelphia/Berwyn, Pennsylvania 530 Lake Cook Road 600 West Swedesford Road Deerfield, IL 60015 Berwyn, PA 19312 Clearwater/St. Petersburg, Florida Placentia, California 5050 Ulmerton Road 700 West Kimberly Ave. Clearwater, FL 33760 Placentia, CA 92870 Columbia, South Carolina Santa Fe, New Mexico 150 Stoneridge Drive 1698 Galisteo Street Columbia, SC 29210 Santa Fe, NM 87505 Greensboro, North Carolina Shreveport-Bossier City, Louisiana 2000 Veasley Street 1001 Gould Drive Greensboro, NC 27407 Bossier City, LA 71111 Irvine, California Spartanburg, South Carolina 10 Morgan Street 9011 Fairforest Road Irvine, CA 92618 Spartanburg, SC 29301 Jackson, Mississippi 881 East River Place Jackson, MS 39202 EXHIBIT B (Capital Contributions and Percentage Interests) Name and Capital Percentage Business Address Contributions Interests ---------------- ------------- ---------- General Partner: AHT Res II GP, Inc. $ 1.00 1% 10 South Third Street Richmond, Virginia 23219 Limited Partner: AHT Res II LP, Inc. $99.00 99% 10 South Third Street Richmond, Virginia 23219