Martin O'Malley, the Confederacy, and the Maryland state song

Martin O'Malley has waded aggressively into the recent debate over the Confederate flag, but he wasn't so vocal about another Confederacy-related dispute that arose in Maryland while he was the state's governor.

O'Malley called Sunday for South Carolina to remove the Confederate flag from the grounds of the state capitol in the wake of a church shooting in Charleston that claimed the lives of nine black parishioners.

Growing calls to remove Confederate flag from S.C. statehouse

"What a terribly jarring and callous sight then--in the wake of this racist massacre--to see the American flag at half staff, while above it at full staff over the state Capitol of South Carolina flew a Confederate flag," O'Malley, a long-shot Democratic candidate for president in 2016, told the U.S. Conference of Mayors. "If the families of Charleston can forgive, can let go of their anger, is it really too much to ask the state government officials of South Carolina to retire the Confederate flag to a museum? America must do better."

He continued in the same vein with an email to supporters on Monday, calling the flag a "rallying banner for hate" and a "symbol of 150 years of bigotry and racism."

But Maryland, too, has its own complicated history with the Confederacy. The state never seceded from the union, but it might have done so absent an intervention by the federal government. Many Marylanders, particularly in the eastern part of the state, were sympathetic to the confederate cause.

That complicated history is reflected in the state's official song, "Maryland, My Maryland," which was adopted in 1939 by the state legislature. The song urges Maryland to secede, referring to Abraham Lincoln as a "despot" and the Union itself as "northern scum."

"Dear Mother! burst the tyrant's chain," the sixth verse reads. "Virginia should not call in vain."

The song has never erupted into a full-blown controversy like the one currently surrounding the flag in South Carolina. But there have been periodic attempts to change the song's lyrics, most recently in 2009, when then-state Sen. Jennie Forehand, a Democrat, sponsored a bill to do just that.

Forehand told the Washington Post that she couldn't recall O'Malley, then the state's governor, speaking out on the issue. The paper reports O'Malley was even "among several state leaders coaxed by a Washington Post reporter that year into singing bits of the song that were posted online."

S.C. Gov. Nikki Haley calls for removal of Confederate flag from capitol

CBS News has reached out to O'Malley's campaign for comment, but no response has yet been received.

The shooting in Charleston, allegedly committed by a 23-year-old white man with white supremacist leanings, has breathed new life into a debate that has persisted for generations across much of the American South.

Under the terms of a compromise struck in 2000, the Confederate flag was removed from atop South Carolina's capitol dome and relocated to a civil war memorial on the statehouse grounds. But South Carolina Gov. Nikki Haley, a Republican, called Monday for the flag to be moved from the capitol premises entirely, saying the controversial banner "does not represent the future of our great state."

The move drew support from the Republican Party's roster of presidential canddiates, including South Carolina Sen. Lindsey Graham.

Hillary Clinton, the Democratic frontrunner, offered similar praise for Haley's decision. She also made sure voters knew she's been pushing to retire the flag for years:

.@nikkihaley is right 2 call for removal of a symbol of hate in SC. As I've said for years, taking down Confederate flag is long overdue. -H

— Hillary Clinton (@HillaryClinton) June 22, 2015