Power company PacifiCorp will cough up $2.5 million in fines after its Wyoming wind farm was found to have killed 38 golden eagles and 336 other protected birds.

The Justice Department prosecuted the company’s green energy project, asserting that the company failed to build the windmills in a way that would minimize the threat to endangered birds.

“PacifiCorp Energy built two of its Wyoming wind projects in a manner it knew would likely result in the deaths of eagles and other protected birds,” said Sam Hirsch, Acting Assistant Attorney General for the Justice Department’s Environment and Natural Resources Division in a statement in December.

PacifiCorp pleaded guilty to the charges earlier this month, according to the Associated Press.

According to the Justice Department, power companies should work with the United States Fish and Wildlife services to properly develop their wind turbines in a way that is sensitive to the local wildlife.

The Land-Based Wind Energy Guidelines issued by the Fish and Wildlife Service call for power companies to spend time “surveying the wildlife present in the proposed project area, consulting with agency professionals” before constructing wind turbines.

“Improperly sited and operated wind energy facilities can kill significant numbers of federally protected birds and other species,” said U.S. Fish and Wildlife Service Director Dan Ashe, in a statement. “That’s why it’s imperative that wind energy developers work with the Fish and Wildlife Service to minimize these impacts at every stage in the process.”

The company will pay $400,000 to the North American Wetlands Conservation Fund and $200,000 in restitution to the State of Wyoming. The company will also pay $1.9 million to the National Fish and Wildlife Foundation as part of its community service.

According to the Justice Department, the company must implement “a migratory bird compliance plan containing specific measures to avoid and minimize golden eagle and other avian wildlife mortalities at the company’s four commercial wind projects in Wyoming.”