CSX issued a statement in which it said there were no serious injuries and no hazardous cargo involved in the 8 a.m. EDT mishap.
The Albany Times Union reported a conductor and an engineer sustained minor injuries. Montgomery County Sheriff Michael Amato said the two were bruised and shaken, the newspaper said.
"One of the trains was traveling from Avon, Ind., to Selkirk, N.Y., with four locomotives and 126 freight cars," the company said. "The other train was moving from Selkirk, N.Y., to New Castle, Pa., with two locomotives and 83 freight cars.
"Preliminary reports are that four locomotives and 45 freight cars are derailed. Some diesel fuel has leaked from the locomotives and environmental specialists crews are on scene cleaning that up.
"The cause is under investigation."
CSX said crews were dispatched to clear the wreckage, repair the track and restore service "as safely and quickly as possible."
The sheriff's office said part of Route 5 near the accident site would be closed until further notice. The tracks carry up to 60 freight trains daily
The newspaper said a hazardous-materials team was sent to the scene.
Amato said CSX has notified him a train car that landed on Route 5 would be removed by Thursday night, but the roadway cannot be reopened until state transportation inspectors determine it is safe for traffic.
Amtrak said some of its Empire Line service west of Albany was affected because the derailed train was blocking all available tracks. Amtrak said CSX had not provided an estimate by midday of when tracks would be cleared and regular service could resume.
Amtrak said Thursday afternoon Empire Service trains would operate Friday, but generally "with alternate transportation to points west of Albany."
Exploding whale video goes viral on Internet
Couple mistakenly served bag of cash at McDonald's drive-thru