A chicken-killing facility in inner-city Calgary that has been a source of frustration for nearby residents for years is to be relocated to make room for the new Green Line of the LRT, city officials said Tuesday.

Residents of the southeast community of Ramsay have long complained about the Lilydale plant and its unpleasant smells, loud noises, ammonia leaks, blood spills and even chickens running around with their heads cut off.

Some residents even tried suing the company in 2011, while others have defended the decades-old plant, noting it was there long before most people moved in to nearby homes.

On Tuesday, the city announced it is "working towards an agreement to purchase the land" that the plant sits on in order to make room for the new light-rail transit line that is due to be built through the area in the coming years.

"Strategic land purchases such as this will enable development to occur over time around our transit stations," Michael Thompson, the city's director of transportation infrastructure, said in a release.

Sofina Foods Inc., which owns the plant, is also in talks to buy city-owned land in the Dufferin North industrial area to build a new facility.

"We are happy to be able to remain in the Calgary area," CEO Michael Latifi said in a release.

"The new site is ideally situated to ensure a smooth transition for our producers, for our suppliers and for our employees."

The city said it will take at least a year to finalize the real-estate transactions and details of the negotiations aren't expected to be made public until late 2018.