A woman was taken to the Jersey City Medical Center yesterday morning after she apparently wandered onto an abandoned train trestle over Newark Avenue in Jersey City and got stuck there, JCMC spokesman Mark Rabson said.

The woman, 79, of Jersey City was seen on the abandoned CSX rail tracks elevated above Newark Avenue near 7th Street.

Rabson said the woman had been stuck on the trestle between three or four hours — while the temperature was in the 40s — before she was discovered. The Jersey City Fire Department, Jersey City Police and Port Authority Police responded to the scene to help free the woman, Rabson said.

The woman, who officials say suffers from dementia, was taken to the Jersey City Medical Center for evaluation, Rabson said.