SAINT JOHN, N.B. -- The New Brunswick Southern Railway Co. has been fined $10,000 and must pay another $40,000 for the implementation of safety research programs after pleading guilty to a pair of charges under the Transportation of Dangerous Goods Act.

The penalties are part of a court settlement that arose out of a Transport Canada regulatory investigation following the 2013 rail derailment and explosion in Lac-Megantic, Que., that killed 47 people.

The Public Prosecution Service of Canada says the company was sentenced Thursday in Saint John, N.B., provincial court.

The railway was charged in 2017 after an investigation revealed it failed to comply with all applicable safety requirements by transporting dangerous goods that were not accompanied by the required documents. It also failed to adequately train its employees in the transportation of dangerous goods.

The offences occurred over an eight-month period between November 2012 and July 2013. They were not related to the Lac-Megantic disaster itself but came from other incidents in the Saint John area.

During that time the railway used 6,853 cars that transported residue of petroleum crude oil for Irving Oil Commercial GP.

Transport Minister Marc Garneau reacted to the sentencing in a statement Thursday.

"As Minister of Transport, my thoughts continue to go out to the community of Lac-Megantic and all those affected by this tragedy," he said. "Today, we close another chapter in this tragic event through a settlement that we have reached with New Brunswick Southern Railway."

Transport Canada originally charged the railway with 24 counts of violating the Transportation of Dangerous Goods Act. The company pleaded not guilty to those charges last April.