**Exhibit 10.4****ALLEGHENY ENERGY, INC.****AMENDED AND RESTATED****REVISED PLAN FOR DEFERRAL OF COMPENSATION OF DIRECTORS**     1. Name and Purpose. Allegheny Energy, Inc. (the “Company”) originally establishedthe Revised Plan for Deferral of Compensation of Directors as of December 2, 1993 (the “Plan”).The purpose of the Plan is to provide a means for the elective deferral of fees payable tonon-employee directors of the Company. The Plan was amended and restated effective as of October5, 2006. The Plan is hereby again amended and restated effective as of October 4, 2007 in order toupdate the Plan for certain changes in applicable law and to make certain other clarifying changes.     2. Participation. Each member of the Company’s Board of Directors (the “Board”) whois not an employee of the Company or any subsidiary of the Company (each a “Non-Employee Director”)may participate in the Plan.     3. Deferral Elections.          3.1 Cash and Common Stock Deferral Elections. Pursuant to the terms of the Plan, aNon-Employee Director may make an election to defer all or a portion of (i) any retainer feepayable in cash with respect to the Non-Employee Director’s service on the Board, (ii) the Boardmeeting fees and committee meeting fees payable in cash with respect to the Non-Employee Director’sattendance at such meetings, (iii) awards of shares of common stock of the Company (“Common Stock”)made to the Non-Employee Director pursuant to the terms of the Company’s Non-Employee DirectorStock Plan (the “Stock Plan”) or otherwise (except that stock awards made pursuant to theCompany’s Restricted Stock Plan for Outside Directors are not eligible for deferral under thePlan), and (iv) other cash or non-cash fees paid to Non-Employee Directors (collectively, “Fees”).A Non-Employee Director may make a separate deferral election with respect to the portion of theFees payable in cash and the portion of the Fees payable in Common Stock.          3.2 Timing and Effect of Elections. Each initial deferral election and each change to(or revocation of) an existing deferral election shall be made by the submission of a writtenelection form to the Secretary of the Company (or its authorized delegate) as follows:               (a) Annual Deferral Election. By December 31 of any calendar year, each Non-EmployeeDirector may make a deferral election that will be given effect with respect to Fees earned by theNon-Employee Director for the succeeding calendar year. If a Non-Employee Director does not make adeferral election by December 31, no Fees will be deferred for the succeeding calendar year.               (b) Deferral Election for New Non-Employee Directors. Each Non-Employee Directorfirst elected or appointed to the Board during a calendar year may make a deferral election within30 days of commencing service as a Non-Employee Director. This
1

 
election will be given effect with respect to Fees earned by the Non-Employee Director afterthe date of the election.               (c) Duration, Change or Revocation of Deferral Election. A Non-Employee Director maychange or revoke an annual deferral election at any time before the calendar year for which theelection will be given effect. Once a calendar year for which an annual election will be giveneffect begins, a Non-Employee Director’s election shall be irrevocable. Once made, a newNon-Employee Director may not change or revoke a deferral election made during a calendar year.Any deferral election shall apply only to the deferrals for the calendar year for which theelection is made and shall not apply to Fees earned (or, in the case of an election to deferdividends, dividends paid) in subsequent calendar years.     4. Maintenance of Deferral Accounts.          4.1 Deferral Account for Fees Payable in Common Stock. The Company shall establishand maintain a recordkeeping deferral account (the “Stock Account”) for each Non-Employee Directorwho elects to defer a portion of the Fees attributable to grants of Common Stock under the StockPlan for a particular calendar year. The Non-Employee Director’s Stock Account shall be creditedwith the number of shares of Common Stock (but not actual shares of Common Stock) deferred by theNon-Employee Director at the end of each calendar quarter. In addition, at the end of eachcalendar quarter, the Stock Account shall be credited with Dividend Equivalents (as defined below),if any.          4.2 Deferral Accounts for Fees Payable in Cash. The Company shall establish andmaintain recordkeeping deferral accounts for each Non-Employee Director who elects to defer aportion of the Fees payable in cash as follows:               (a) Cash Deferral Account. A Non-Employee Director may elect to have all or a portionof the Fees payable to him in cash for a particular calendar year credited to a cash deferralaccount (the “Cash Deferral Account”). Any such amounts shall be credited to the Cash DeferralAccount on the 15th of the calendar month following the date the Fees otherwise would have beenpaid to the Non-Employee Director, or if the 15th is a non-business day, the next followingbusiness day of the month. In addition, at the end of each calendar quarter, the Cash DeferralAccount shall be credited with interest (compounded monthly based on the average daily outstandingbalance) at a rate equivalent to the prime rate of interest as published by the Federal Reserve atthe beginning of such calendar quarter.               (b) Stock Unit Account. A Non-Employee Director may elect to have all or a portion ofthe Fees payable to him in cash credited to a stock unit account (the “Stock Unit Account”). Anysuch amounts shall be credited to the Stock Unit Account on the 15th of the calendar monthfollowing the date the Fees otherwise would have been paid to the Non-Employee Director or if the15th is a non-business day, the next following business day of the month. Any amount credited tothe Stock Unit Account shall be deemed to be invested in a number of units of Common Stock obtainedby dividing such amount by the Market Value Per Share (as defined below) as of the day such amountsare credited to the Stock Unit Account. Further, the Stock Unit Account shall be credited on thelast day of each calendar quarter withDividend Equivalents, if any.
2

 
               4.3 Election Rules. Any election made by a Non-Employee Director under this Section 4shall be subject to the same timing and effect requirements that apply to deferral elections as setforth in Section 3.2. Further, any election made by a Non-Employee Director under this Section 4shall apply only to the deferrals for the calendar year for which the election is made and, assuch, a Non-Employee Director shall not be permitted to make an election under this Section 4 foramounts deferred in a prior calendar year, other than that described in Section 6.1.               4.4 Dividend Equivalents. Each Non-Employee Director who elects to defer amounts tohis Stock and/or Stock Unit Account shall also be entitled to receive additional credits for eachdividend declared by the Company until such time as his Stock and/or Stock Unit Account isdistributed to him (“Dividend Equivalents”). The amount of any such Dividend Equivalents shall beequal to: (1) in the case of a cash dividend or a dividend paid in property (other than shares ofCommon Stock), the number of shares or units of Common Stock determined by dividing (A) the amountof any cash dividend (or the fair market value of a dividend paid in property, other than adividend paid in Common Stock) which the Non-Employee Director would have received if on thepayment date for such dividend the Non-Employee Director had been the owner of record of a numberof shares of Common Stock (or units) then credited to the Non-Employee Director’s Stock and/orStock Unit Accounts by (B) the Market Value Per Share (as defined below) as of such payment date;and (2) in the case of a stock dividend, the number of full and fractional shares of Common Stockwhich the Non-Employee Director would have received if on the payment date for a dividend which isto be paid in Common Stock, the Non-Employee Director had been the owner of record of a number ofshares of Common Stock (or units) then credited to the Non-Employee Director’s Stock and/or StockUnit Accounts.               4.5 Definition of Market Value Per Share. For purposes of the Plan, the term “MarketValue Per Share” shall mean the average of the highest and the lowest sale price per share on thedate of reference for shares of Common Stock as reported on the New York Stock Exchange on suchdate (or, if such date shall not be a business day, the next preceding day which shall be abusiness day). If no sale occurs on such date, the Market Value Per Share shall be determined, inthe manner described above, as of the first preceding business day on which a sale occurs.               4.6 Changes in Capitalization. A Non-Employee Director’s Stock Account and Stock UnitAccount shall be appropriately adjusted for any change in the Common Stock by reason of any stockdividend, stock split, combination or exchange of shares, merger, consolidation or other change incapitalization with a similar substantive effect on the Common Stock and the Plan.     5. Beneficiary Designation. Each Non-Employee Director may, at any time, designate a“Beneficiary” or “Beneficiaries” to receive amounts credited to the Non-Employee Director’sdeferral accounts in the event of the Non-Employee Director’s death. A Non-Employee Director maymake an initial Beneficiary designation, or change an existing Beneficiary designation, bycompleting and signing a Beneficiary designation form and
3

 
submitting it to the Secretary of the Company (or its authorized delegate). Upon receipt by theSecretary of the Company of a Non-Employee Director’s Beneficiary designation form, all Beneficiarydesignations previously filed shall automatically be canceled. In the absence of an effectiveBeneficiary designation, amounts credited to a Non-Employee Director’s deferral accounts as of hisdeath shall be paid to the person(s) legally entitled to such amount under the Non-EmployeeDirector’s will or, if none, to the Non-Employee Director’s estate.     6. Distribution of Deferrals.          6.1 Distribution Election. At the time that a Non-Employee Director makes an electionto defer Fees for a particular calendar year as described in Section 3, the Non-Employee Directorshall make an irrevocable distribution election to have the Fees deferred for such calendar year(and any interest or Dividend Equivalents accrued thereon) distributed to him in a single lump sumpayment as soon as administratively practicable, but in no event later than 30 days, after: (i) thefirst day of a calendar year that is no less than 12 months and a day from the date of thedistribution election, or (ii) the date that the Non-Employee Director experiences a separationfrom service with the Company. In the event that a Non-Employee Director fails to make theelection provided in the preceding sentence, such Non-Employee Director shall be deemed to havemade an election to receive the payment described in clause (ii) of the preceding sentence. Forpurposes of the Plan and this Section 6.1, a Non-Employee Director shall be determined to haveexperienced a separation from service with the Company when the Non-Employee Director ceases to bea member of the Board for any reason other than death, including resignation, removal or failure tobe re-elected, such determination to be made in accordance with Section 409A of the InternalRevenue Code of 1986, as amended (the “Code”) and its corresponding regulations and relatedguidance.          6.2 Form and Amount of Distribution. Any distribution of Fees deferred to aNon-Employee Director’s Cash Deferral Account for a particular calendar year shall be paid in cashand the amount of such distribution shall be equal to the Fees deferred for such calendar year andany interest accrued thereon up to the distribution date elected by the Non-Employee Director inaccordance with Section 6.1. Any distribution of Fees deferred to a Non-Employee Director’s StockUnit Account for a particular calendar year shall be paid in cash and the amount of suchdistribution shall be equal to (i) the number of units credited to the Stock Unit Account for Feesdeferred by the Non-Employee Director for such calendar year (and any Dividend Equivalents creditedwith respect to such units) as of the distribution date elected by the Non-Employee Director inaccordance with Section 6.1, multiplied by (ii) the Market Value Per Share as of the distributiondate elected by the Non-Employee Director in accordance with Section 6.1. Any distribution of Feesdeferred to a Non-Employee Director’s Stock Account for a particular calendar year shall be paid inthe form of shares of Common Stock from the Company’s Stock Plan (except that any fraction of ashare of Common Stock shall be paid in cash) and the number of shares of Common Stock paid shall beequal to the number of shares of Common Stock credited to the Stock Account for Fees deferred bythe Non-Employee Director for such calendar year (and any Dividend Equivalents credited withrespect to such shares).          6.3 Death. If a Non-Employee Director should die before full payment of the balancein his accounts, the remaining balance shall be paid in a lump sum to his or her
4

 
designated Beneficiaries or his estate in accordance with Section 5. Such payment shall bemade within the 60-day period following the date of a Non-Employee Director’s death.     7. Special Deferral and Payment Elections. Notwithstanding any other provision of thePlan to the contrary, in accordance with the special transition relief issued pursuant to Section409A of the Code and the procedures established by the Board (or its authorized delegate), but nolater than December 31, 2007, Non-Employee Directors shall be offered the opportunity to make newdeferral and payment elections for Fees (and any dividends declared with respect thereto) deferredunder the Plan.     8. Unfunded Status of the Plan. A Non-Employee Director shall not have any interestin any amount credited to his deferral accounts until it is distributed in accordance with thePlan. Distributions under the Plan shall be made only from the general assets of the Company. Allamounts deferred under the Plan shall remain the sole property of the Company, subject to theclaims of its general creditors and available for its use for whatever purposes are desired. Withrespect to amounts deferred, a Non-Employee Director is a general creditor of the Company and theobligation of the Company hereunder is purely contractual and shall not be funded or secured in anyway.     9 Administration. Subject to all applicable legal requirements, including withoutlimitation, compliance with securities, tax or other laws, or rules, regulations or regulatoryinterpretations thereof, applicable to the Plan, the Plan shall be administered by the Board (orBoard Committee as designated by the Board), which shall have the sole authority to construe andinterpret the terms and provisions of the Plan. The Board (or its authorized delegate) shallmaintain records and disburse payments or shall cause such records to be maintained and payments tobe disbursed. The Board’s interpretations, determinations, regulations and calculations shall befinal and binding on all persons and parties concerned. The Board may adopt, amend and rescindsuch rules and regulations as it deems necessary, desirable or appropriate in administering thePlan, and the Board may act at a meeting, in a written action without meeting or by having actionsotherwise taken by a member of the Board pursuant to a delegation of duties from the Board. Thedetermination of the Board as to any disputed questions arising under the Plan, including questionsof construction and interpretation, shall be final, binding and conclusive upon all persons.     10. Amendment and Termination. The Plan may, at any time, be amended, modified orterminated by the Board. No amendment, modification or termination shall, without the consent of aNon-Employee Director, adversely affect such Non-Employee Director’s rights with respect to amountsaccrued under his or her deferral accounts.     11. Miscellaneous Provisions.          11.1 Nothing contained herein shall be construed as conferring upon a Non-Employee Directorthe right to continue in such capacity.
5

 
          11.2 The rights and obligations created hereunder shall be binding on a Non-EmployeeDirector’s heirs, executors and administrators and on the successors and assigns of the Company.          11.3 The provisions of the Plan shall be construed and applied under the laws of the State ofNew York, without regard to its conflict of laws principles.          11.4 If any provision of the Plan shall be held invalid or unenforceable, such invalidity orunenforceability shall not effect any other provisions hereof and the Plan shall be construed andenforced as if such provisions had not been included.          11.5 The headings and captions herein are provided for convenience only, and shall not beconstrued as part of the Plan, and shall not be employed in the construction of the Plan.          11.6 Any benefit payable to or for the benefit of a payee who is a minor, an incompetentperson, or is otherwise incapable of receipting therefor shall be deemed paid when paid to suchperson’s guardian or to the party providing, or a reasonably appearing to provide, the care forsuch person, and such payment shall fully discharge the Company, the Board and all other partieswith respect thereto.          11.7 The rights of a Non-Employee Director to the payment of amounts credited to his or herdeferral account shall not be assigned, transferred, pledged or encumbered or be subject in anymanner to alienation or anticipation. A Non-Employee Director may not borrow against amountscredited to the Non-Employee Director’s account and such amounts shall not be subject in any mannerto anticipation, alienation, sale, transfer, assignment, pledge, encumbrance, change, garnishment,execution or levy of any kind, whether voluntary or involuntary, prior to distribution.          11.8 The Plan is intended to comply with applicable law. Without limiting the foregoing, theterms of the Plan are intended to, and shall be interpreted and applied so as to, comply in allrespects with the provisions of Section 409A of the Code and its corresponding regulations andrelated guidance to the extent it applies to the Plan. Notwithstanding any provision of the Planto the contrary, to the extent applicable, deferrals and distributions under the Plan may only bemade in a manner and upon an event permitted by Section 409A of the Code. To the extent that anyprovision of the Plan would cause a conflict with the requirements of Section 409A of the Code orwould cause the administration of the Plan to fail to satisfy the requirements of Section 409A ofthe Code, such provision shall be deemed null and void to the extent permitted by applicable law.Further, the Board shall have the authority to amend the Plan or take such other actions as theBoard determines is necessary to comply with the requirements of Section 409A of the Code and itscorresponding regulations and related guidance.
6