Exhibit 5.1 Opinion of Ropes & Gray August 17, 1999 Securities and Exchange Commission 450 Fifth Street, N.W. Washington, DC 20549 Re: NSTAR Amended Registration on Form S-8 to Form S-4 Ladies and Gentlemen: We have acted as counsel to NSTAR (the "Registrant"), a Massachusetts business trust, in connection with the Registrant's Post-Effective Amendment No. 2 (the "Registration Statement") on Form S-8 to the Form S-4 that was filed on May 12, 1999 (File No. 333-78285). The Registration Statement is to be filed with the Securities and Exchange Commission and relates to the registration under the Securities Act of 1933, as amended, of 2,231,918 Common Shares, par value $1.00 per share (the "Shares"), in connection with the Stock Incentive Plan, the Boston Edison Savings Plan, the Boston Edison Negotiated Savings Plan for Office, Technical, and Professional Employees, and the Boston Edison Negotiated Savings Plan for Production and Maintenance Employees (collectively, the "Plans"). We are familiar with the Registration Statement and the Plans, and we have examined the Registrant's Declaration of Trust, dated April 20, 1999, and the Registrant's By-Laws. We have also examined such other documents, instruments, certificates and corporate records as we considered necessary for purposes of this opinion, and have assumed that the signatures on all documents examined by us are genuine. Based on the foregoing, we are of the opinion that the Shares, when issued in accordance with the Plans and the consideration therefore received by the Registrant, will be authorized, validly issued, fully paid and nonassessable. We hereby consent to the filing of this opinion as Exhibit 5.1 to the Registration Statement. Very truly yours, /s/ Ropes & Gray Ropes & Gray