The state has stopped giving the public any information about rail shipments of crude oil through the state, citing a law that went into effect in October that prohibits public disclosure of items transported by a railroad.

The law adds rail commodities to the list of state records that are exempt from the Freedom of Access Act. The Legislature passed the bill, LD 484, in June after overturning a veto by Gov. Paul LePage.

But the impact of the law is uncertain since virtually all oil shipments by rail have ceased over the last year because of changing market forces. Refineries in Canada – the destination of oil transported via rail through Maine – are getting their crude shipments elsewhere and no longer need Maine rail connections.

The Maine Department of Environmental Protection tracks oil shipments by rail through the state and for years has reported the data monthly. The agency two months ago stopped making that data public and is now working with the Maine Attorney General’s office to clarify how the agency should comply with the law, according to DEP spokesman David Madore. The clarifications could also affect disclosure of oil transported through the Portland Pipe Line, although the volume of oil traveling through that conduit has also slowed to a trickle.

Former Standish lawmaker Mike Shaw, who sponsored the bill, told the Legislature’s Judiciary Committee in April, said that railroads are put at a competitive disadvantage when the commodities they carry are disclosed to the public. He said the railroads will still provide this information to first-responders, such as fire departments, and other emergency public servants.

“This narrow exemption will ensure that information is available to those who need it without damaging the intent or spirit of the state’s right to know law,” he told the committee.

Shaw, a Democrat, resigned from his House seat in August after his family moved to Freeport. He could not be reached for comment Friday.

The Association of American Railroads, which represents the nation’s largest railroads, believes that public disclosure of rail cargo makes trains less safe because terrorists could use the data to target them.

The industry for years has been providing this information to emergency service and safety personnel, said Ed Greenberg, the group’s spokesman.

“Our concern is that publicizing it elevates security risks,” he said.

Bob Klotz, a spokesman for 350 Maine, an environmental group that has protested oil-by-rail cargo, said the purpose of the new law is to undercut the political activities of groups such as his that oppose rail shipments of oil. The group opposes transportation of oil via all conveyances because fossil fuels contribute to climate change.

“It’s clearly an effort to withhold information,” said Klotz, who lives in South Portland. “People in communities need to have this information but they don’t want us to have it.”

The controversy over oil shipment by rail increased after the Lac-Megantic, Quebec, explosion in July 2013 that killed 47 people. The federal government in 2014 required railroads to share information on the shipment of crude oil with emergency responders, but the information could be exempt from public disclosure under state and federal open records laws.

The Quebec disaster was caused by a runaway oil train operated by the Montreal, Maine & Atlantic Railway. At the time, Maine was among the largest oil-exporting U.S. states, transshipping millions of barrels of crude by rail from North American oilfields to Irving Oil’s refinery in Saint John, New Brunswick.

Since them, oil shipments by Maine railroads have come to a halt.

Irving Oil in June confirmed that it has stopped accepting oil shipments by train. The cutback is due to global oil-supply-and-demand issues and is not related to the fallout from the Lac-Megantic rail disaster, Irving officials said.

The U.S. demand for Canadian-produced petroleum products has declined in the wake of an oversupply of oil from domestic and Mideast sources.

In 2012, Maine railroads shipped 5.2 million barrels of crude oil, but shipments declined sharply after the Lac-Megantic disaster.

The Montreal, Maine & Atlantic Railway never carried oil again and went bankrupt. Its successor, the Central Maine & Quebec Railway, also has never carried oil because of political opposition in Lac-Megantic.

Pan Am Railways, whose trains travel through Portland, carried just 15,545 barrels of oil in all of 2014, according to records the company filed with the Maine Department of Environmental Protection. In 2015, Pan Am has carried 37,128 barrels. All those shipments occurred in February, the last month the railroad delivered oil to the Irving refinery.