B757-200
Aircraft Equipment Problem Less Severe
Flight Crew Landed As Precaution; Flight Crew Diverted; General Declared Emergency
Aircraft
About 100 miles west of ZZZZ enroute at FL390; a distinct electrical smell became noticeable in the cockpit and in the cabin as far back as the 2L door.  Since the pilots and the flight attendants were unable to locate the origin; the Captain declared an emergency and we landed uneventfully in ZZZZ.
At about 100 miles from ZZZZ at FL390 smelled strong electrical smoke in the flight deck.  Just started to investigate the source when the Flight Attendant called to say they had a strong odor of electrical smoke by the 2l and 2r doors. Asked the Flight Attendant to try to identify the source then ask ATC for vectors toward ZZZZ just in case.  After a few minutes of looking for the source with no luck; declared an emergency and ask to divert to ZZZZ.  Landed uneventfully in ZZZZ.
B757-200 flight crew reports smelling strong electrical smoke in the flight deck at FL390.  The flight attendants also report an odor at the 2L and 2R doors.  After a few minutes of looking the crew elects to divert to the nearest suitable airport.