In the last 15 years, there have been 21 collisions at these crossings, the federal data show, leaving one person dead and eight injured. Most of the serious collisions were in the industrial neighborhood of Maspeth, Queens.

Maspeth is the hub of the little-known New York & Atlantic, a short-haul freight line owned by Anacostia Rail Holdings of Chicago that transports food, building materials, paper, recyclable metals and waste products to, from and through Brooklyn and Queens and Nassau and Suffolk Counties. Its trains operate on Long Island Rail Road tracks under a franchise that the Long Island Rail Road surrendered in 1997 to get out of the freight business.

The injuries at Maspeth crossings occurred from 2004 to 2011, according to the federal data. There have been none since.

(The fatality carried in federal records occurred Dec. 13, 2012, in Little Neck, Queens, when an eastbound Long Island Rail Road train sideswiped 71-year-old Paul Corsello. He had walked around the lowered gates and into the crossing, according to the agency’s accident report. Aaron Donovan, a spokesman for the railroad, said it was not classified a suicide. A 35-year-old man was struck and killed by a New York & Atlantic train on Feb. 19, 2007, about 65 feet west of the 88th Street crossing in Glendale, Queens. That death was ruled a suicide, Mr. Donovan said.)

Paul M. Victor, the president of the New York & Atlantic, credited the improved safety record of recent years partly to the railroad’s policy of not running its trains faster than 10 miles per hour within city limits. In addition, he said, as a matter of operational procedure, trains are slowed almost to a standstill before passing over crossings.