The statue of a confederate soldier was removed from outside the University of Louisville campus on Saturday after the city won a months long legal battle to relocate the controversial monument.

The removal came after Louisville mayor Greg Fischer and then-University of Louisville President James Ramsey announced their intention in April to take down the monument, which had long been considered controversial at the school.

Louisville Mayor Greg Fischer speaks in front of the Confederate monument near the University of Louisville with the university president, James Ramsey, left, in Louisville, Kentucky, April 29, 2016. Dylan Lovan / AP file

In recent years, students and staff raised concerns that the memorial, which honored confederate soldiers, condoned slavery.

Read More: House Votes to Ban Confederate Flags on VA Cemetery Flagpoles

"The stain of slavery and racism that this monument represents for many, many people has no place in a compassionate, forward leaning city," said Fischer in a statement earlier this year.

However a group of residents and the Sons of Confederate Veterans opposed any tampering with the monument, and brought suit against the city of Louisville to stop them.

Ultimately, a circuit court judge sided with the city, upholding its right to remove it.

"These monuments, as well as other symbols of the Confederacy, are now viewed as a romanticism of the past, pride in 'Southern Heritage,' history to be acknowledged and lessons learned, reminders of slavery or indicative of present racist sentiment," wrote Judge Judith McDonald-Burkman in her decision. "The court recognizes, even if it does not agree with, these often-times competing emotional elements."

The monument is slated to be relocated to Brandenburg, Kentucky, about 45 miles away, which hosts a biennial Civil War re-enactment. The 121-year-old statue was gifted to the city of Louisville in 1895 to commemorate the Kentuckians who fought and died in the 1861-1865 war.

"The mayor is pleased that we found a new home in a neighboring county that puts the monument in context at an historic Civil War site," Chris Poynter, a spokesman for Fischer, said in a statement to NBC News.

Read More: University of Mississippi Faculty Votes to Remove State Flag

The move comes during a period when other communities and universities are considering removing Confederate symbols as critics considered the displays as fostering racism. Vanderbilt University and the University of Mississippi removed confederate symbols from its campuses earlier this year.

"We are pleased that Louisville Metro and the City of Brandenburg are working to ensure a proper and fitting location for the statue,” said Acting University of Louisville President Neville Pinto in a statement to NBC News. “While we do not wish to erase history, the University of Louisville is looking to a future that embraces and promotes diversity and inclusion for all our faculty, students and staff."