Newly appointed Alabama Gov. Kay Ivey, center, attends a federalism event with governors in the Roosevelt Room at the White House in Washington, Wednesday, April 26, 2017. AP Photo/Andrew Harnik MONTGOMERY, Ala. (AP) — Alabama Gov. Kay Ivey on Wednesday signed into law sweeping protections for Confederate and other long-standing monuments, a move that comes as some Southern cities remove Confederate monuments from public grounds.

Sen. Gerald Allen, the Republican bill sponsor, praised Ivey’s decision.

“Contrary to what its detractors say, the Memorial Preservation Act is intended to preserve all of Alabama’s history — the good and the bad — so our children and grandchildren can learn from the past to create a better future,” Allen said.

The new Alabama law prohibits the removal and alteration of monuments more than 40 years old. It also prohibits renaming schools that have carried a person’s name for more than 40 years. A new commission would have to approve changes to those between 20 and 40 years old.

African-American lawmakers opposed the bill at every step of the legislative process. They argued that the monuments pay tribute to the shameful legacy of slavery.

“You say we are protecting history. We are not protecting history. We are protecting monuments that represent oppression to a large part of the people in the state of Alabama,” Sen. Hank Sanders, an African-American Democrat from Selma, said during the debate.

The landscape of the states that once made up the Confederacy is dotted with monuments erected in the decades after the Civil War paying homage to the so-called Lost Cause. A few Southern cities have begun to rethink those tributes, causing a backlash from supporters.

New Orleans last week completed the removal of four Confederate statues. The city’s mayor first proposed removing the monuments after the 2015 massacre of nine black parishioners at a South Carolina church. The killer, Dylann Roof, was an avowed racist who carried Confederate battle flags in photos.

The proposed removal of a statue of Gen. Robert E. Lee in Charlottesville, Virginia, prompted a torch-lit protest and a candle-lit counter-demonstration there.

Birmingham’s park board has approved a resolution to remove a 52-foot-tall Confederate monument in a downtown park in 2015, prompting a legal challenge from a Southern heritage organization.