A freight train derailed on a bridge near Harpers Ferry, W.Va., early Saturday, spilling two cars into the Potomac River.

A CSX locomotive heading east between Harpers Ferry and Brunswick, Md., had been towing seven empty grain cars across the Winchester and Potomac Railroad Bridge about 2:30 a.m., when the train careened off the tracks, CSX officials said.

Two of the seven cars hurtled into the water below, officials said, toppling over a footpath frequented by visitors to Harpers Ferry National Historical Park.

No one was injured, although part of the Civil War-era bridge crumbled in the crash.

Access to parts of several state parks — Harpers Ferry National Historical Park, Chesapeake & Ohio Canal National Historical Park and the Appalachian National Scenic Trail — will be limited as a result.

The footbridge, which is part of the Appalachian National Scenic Trail, will remain closed indefinitely as officials repair the damage and determine the cause of the derailment, according to the National Park Service.

John Brown’s Fort and a popular destination at Harpers Ferry known as “The Point” — a water gap in the Blue Ridge Mountains where the Potomac and Shenandoah rivers merge and from where visitors can look upon Maryland, Virginia and West Virginia all at once — will also be closed as crews work to clean up the area and assess what happened on the bridge, park officials said.

Visitors will also be unable to cross between Harpers Ferry and the C&O Canal towpath or from Harpers Ferry to the Maryland Heights Trail, park officials said.

Because of the location of the crash, officials from Maryland, Virginia, West Virginia and the Park Service responded to the incident.

Other train service in the area, including Amtrak passenger rail, will not be affected by the incident.

CSX said in a statement Saturday that the company plans to work “swiftly and safely in the cleanup and to restore the area.”