Jodi Ross, town manager in Westford, Mass., did not expect she would be threatened with arrest after she and her fire chief went onto the railroad tracks to find out why a train carrying liquid petroleum gas derailed on a bridge in February.

But as they reached the accident site northwest of Boston, a manager for Pan Am Railways called the police, claiming she was trespassing on rail property. The cars were eventually put back on the tracks safely, but the incident underlined a reality for local officials dealing with railroads.

“They don’t have to tell us a thing,” Ms. Ross said. “It’s a very arrogant attitude.”

American railroads have long operated under federal laws that shield them from local or state oversight and provide a blanket of secrecy over much of their operations. But now a rapid rise in the number of trains carrying crude oil — along with a series of derailments and explosions — has brought new concern about the risks of transporting dangerous cargo by rail.

Local and state officials complain that they receive very little information about when hazardous materials are shipped through their communities or how railroads pick their routes. Federal interstate commerce rules give them little say in the matter and railroads are exempted from federal “right to know” regulations on hazardous material sites.