A 27-year-old student and former Marine has died after climbing onto electrified train tracks to urinate.

Zachary McKee, from Ossian, Indiana, accidentally fell on the third track of the L system - the Chicago-area subway - in Evanston, Illinois.

He was pronounced dead in hospital at 11.52 p.m., according to the Cook County Medical Examiner?s office.

McKee, who had served as a postal clerk in the Marines, was at the South Boulevard Purple Line with two friends when he climbed on to the tracks.

Authorities have not revealed whether the man urinated on the third rail.

After he was electrocuted, one friend ran to the entrance of the station and alerted the security guard on duty, CTA spokeswoman Lambrini Lukidis told the Sun-Times.

The security guard then contacted Evanston Police and Fire officials.

According to McKee's Twitter page, he had travelled to Evanston to watch a Chicago Cubs baseball game at Wrigley Field.

He was staying with friends in Chinatown and was enjoying a weekend of heavy drinking, the profile indicates.

'There's no stopping us right now,' he had tweeted before his death on Sunday.

He had served in the Anbar province in Iraq and Iwakuni, Japan. He left the Marines in 2010, after four years.

McKee was working towards his undergraduate degree in political science and government at Indiana University-Purdue University at Fort Wayne.

One friend, Zach Powers, tweeted on Monday morning: 'Going to miss you Zachary W. McKee, you were truly a great friend.'

Surveillance video at the station recorded the accident, authorities said. Service on the Purple Line was held up for half an hour.

An autopsy is scheduled for later on Monday