SAINT JOHN, N.B. -- A company has been ordered to pay $750,000 after pleading guilty Thursday to two charges in connection with the death of about 7,500 birds that flew into a burning flare at a gas facility in New Brunswick two years ago.

A provincial court judge said the money to be paid by Canaport LNG LP will be distributed to numerous environmental and wildlife organizations.

The company was originally facing two charges under the federal Migratory Birds Convention Act that prevent anyone from depositing a substance harmful to migratory birds, and one charge of unlawfully killing Canada warblers under the federal Species at Risk Act.

One of the charges under the Migratory Birds Convention Act was dropped.

Charges against two other companies -- Irving Canaport GP and Repsol Canada -- were also dropped.

An investigation was launched by Environment Canada after thousands of migrating birds were killed in September 2013 while excess gas was being burned-off at the facility in Saint John.

The money from the fine will be used for a variety of programs, such as a study in bird migration by Bird Studies Canada and a scholarship at the University of New Brunswick in environment and natural resources. The New Brunswick Museum will get $150,000 to create a DNA database from the dead birds.

Don McAlpine, zoologist and curator at the New Brunswick Museum, said the combination of a low cloud ceiling, fall migration and a large flare was a recipe for disaster.

"It's not uncommon for birds to be attracted to light and be killed flying into office buildings and radio towers, but uncommon to have so many birds fly into a flare," he said.

The flare tower at the Canaport liquefied natural gas receiving and regasification terminal is about 30 metres tall. Flaring is used to maintain normal operating pressure by burning off excess natural gas.

Lawyers for the three companies declined comment outside court.

Federal prosecutor Paul Adams said the purpose of the prosecution was the protection and conservation of a valued natural resource when he was asked why most of the charges in the case were dropped.

"In the circumstances we felt that the charges to which the partnership pleaded guilty and the recommended penalty at least contributed to those purposes," he said outside court.

Adams said the company had already taken measures to try to prevent the situation from happening again.

McAlpine said the deaths of the birds will have a scientific legacy.

"Tragic as this incident was, it's also an opportunity to learn a lot about the biology of these birds," he said.

The museum has kept all the birds in freezers since the incident.

"These birds will still be accessible and useful 50 or 100 years from now, in the same way we are using birds in the collection that were collected in the 1880s."