Exhibit 4 THIRD AMENDMENT TO RIGHTS AGREEMENT THIRD AMENDMENT (this "Third Amendment to Rights Agreement"), dated as of July 6, 2001 to the Rights Agreement between Sun Company, Inc. and First Chicago Trust Company of New York, as Rights Agent dated as of February 1, 1996, as amended July 3, 1997, and February 3, 2000 (the "Rights Agreement"). R E C I T A L S --------------- A. Pursuant to Section 27 of the Rights Agreement, Sunoco, Inc., the successor by name change to Sun Company, Inc. (the "Company") and EquiServe Trust Company, N.A., the successor to First Chicago Trust Company of New York (the "Rights Agent"), shall, if the Company so directs, supplement or amend any provision of the Rights Agreement in accordance with the provisions of Section 27 thereof. B. The Board of Directors has declared it advisable and in the best interests of the Company and its stockholders to amend the Rights Agreement in the manner set forth below. A G R E E M E N T ----------------- NOW, THEREFORE, in consideration of the foregoing and the covenants set forth herein, the Company hereby directs, and the parties hereto agree that, the Rights Agreement is amended as follows: 1. The definition of "Continuing Director" set forth in Section 1 of the Rights Agreement is amended to read in its entirety as follows: "Continuing Director" shall mean (i) any member of the Board of Directors of the Company, while such Person is a member of the Board, who is not an Acquiring Person, or an Affiliate or Associate of an Acquiring Person, or a representative or nominee of an Acquiring Person or of any such Affiliate or Associate, and was a member of the Board prior to the date of this Third Amendment to Rights Agreement, or (ii) any Person who subsequently becomes a member of the Board, while such Person is a member of the Board, who is not an Acquiring Person, or an Affiliate or Associate of an Acquiring Person, or a representative or nominee of an Acquiring Person or of any such Affiliate or Associate, if such Person's nomination for election or election to the Board is recommended or approved by a majority of the Continuing Directors then in office, provided that such Person's initial assumption of office did not occur as a result of an actual or threatened election contest with respect to the election or removal of directors or other actual or threatened solicitation of proxies or consents by or on behalf of a Person other than the Board. 1 2. This Third Amendment to Rights Agreement shall be deemed to be a contract made under the laws of the Commonwealth of Pennsylvania and for all purposes shall be governed by and construed in accordance with the laws of such Commonwealth applicable to contracts to be made and performed entirely within such Commonwealth, without giving effect to its principles of conflicts of laws. 3. This Third Amendment to Rights Agreement may be executed in any number of counterparts, each of which shall be an original, but such counterparts shall together constitute one and the same instrument. 4. Terms not defined herein shall, unless the context otherwise requires, have the meanings assigned to such terms in the Rights Agreement. 5. In all respects not inconsistent with the terms and provisions of this Third Amendment to Rights Agreement, the Rights Agreement is hereby ratified, adopted, approved and confirmed. In executing and delivering this Third Amendment to Rights Agreement, the Rights Agent shall be entitled to all the privileges and immunities afforded to the Rights Agent under the terms and conditions of the Rights Agreement. [Signature Page Follows] 2 IN WITNESS WHEREOF, this Third Amendment to Rights Agreement has been duly executed by the Company and the Rights Agent as of the day and year first written above. SUNOCO, INC. [SEAL] By: /s/THOMAS W. HOFMANN ------------------------ Thomas W. Hofmann Vice President and Chief Financial Officer Attest: By: /s/ANN C. MULE' -------------- Ann C. Mule' Assistant General Counsel and Corporate Secretary Sunoco, Inc. Countersigned: EQUISERVE TRUST COMPANY, N.A. (f/k/a FIRST CHICAGO TRUST COMPANY OF NEW YORK), as Rights Agent By: /s/ANTHONY MILO ---------------- Anthony Milo Manager, Corporate Actions Attest: By: /s/ MARK GHERZO -------------------- Name: Mark Gherzo Title: Director 3