For 40 years, Maryland lawmakers have tried to replace the state song “Maryland, My Maryland,” which celebrates the Confederacy with lyrics many consider racist. A 2018 bill to redesignate the song as a “historical song” died in committee.

In the wake of the death of George Floyd in Minneapolis police custody this spring, Maryland House Speaker Adrienne A. Jones (D-Baltimore County) — the first African American person to hold that powerful position — called for getting rid of the song altogether.

And now, U.S. Rep. Jamie B. Raskin (D-Md.), who served nine years in Annapolis before being elected to Congress, has helped write a history-laden alternative.

Raskin introduced “Maryland, My Maryland (The Free State Song)” at a Zoom meeting of Maryland Democrats earlier this week that was part of the online Democratic National Convention. He told them it was the first time he had put on his songwriting hat since he penned a ballad to his high school crush in the 1970s.

“I just hope this song is more successful,” Raskin said, smiling, as he introduced his latest work, performed in a soulful alto by London Mevaa, a student at Northwestern High School in Prince George’s County.

U.S. House Majority Leader ­Steny H. Hoyer bopped in his chair as he listened. State Democratic Party Chairwoman Yvette Lewis got teary-eyed. Former governor and Baltimore mayor Martin O’Malley, who in his spare time plays in a Celtic rock band, belted out a chorus, pumping his fist to punctuate the mention of the state’s largest city.

“Maryland, My Maryland, I’m coming back again,” crooned O’Malley, adding a slight rock flare to the final stanza. “From the western mountains to the Ocean City shore, Rockville to Baltimore.”

O’Malley told Raskin the song was catchy: “I’m going to be singing that song all day, which is a good sign, Jamie.”

The rave reviews kept pouring in.

“Beautiful,” one person yelled out on the Zoom call. “Outstanding, Jamie, outstanding,” said U.S. Rep. Anthony G. Brown.

Gone are the lyrics, written by Baltimore native and Confederate sympathizer James Ryder Randall in 1861, that refer to Abraham Lincoln as a “tyrant” and urge Maryland to secede and join the Confederacy against the “Northern scum.” And out is the tune set to “Lauriger Horatius.”

In its place is a slightly folksy beat with lyrics that pay homage to famous Marylanders including Thurgood Marshall, Frederick Douglass, Harriet Tubman, Billie Holiday, Edgar Allan Poe, Rachel Carson and the late representative Elijah E. Cummings, who died last year. Orioles and the Chesapeake Bay get a mention, too.

“Oh say can you see Elijah Cummings now, never took his hand from the freedom plow,” Northwestern High’s Mevaa sang soulfully.

That was the line that got Lewis.

“I was holding it together until I heard Elijah Cummings’s name,” she said.

Abena Affum-McAllister, a delegate to the Democratic National Convention, said she didn’t last as long as the party chairwoman. She said she had to turn her screen off because she was so emotional.

“The people he named, Thurgood Marshall, Harriet Tubman and so many others, that’s Maryland,” she said in an interview Thursday. “That’s a true song that represents the struggles and triumphs and all of the things that have made our state the great state that it is now.”

Raskin co-wrote the song with Steve Jones, the musical director of the DC Labor Chorus, who also accompanied Mevaa on piano. He said he knows there will likely be other contenders to replace the state song if the General Assembly decides to repeal it.

“It’s the dumbest thing in the world for Maryland, of all states, to have a racist, secessionist song,” Raskin said. “We were with the Union, and we promote freedom and democracy for everybody, and that is what the new state song demonstrates. It’s about telling the real story of Maryland.”

Maryland was a border state that allowed enslavement. Although many of its power brokers were Confederate sympathizers, the state remained in the Union during the Civil War.

In arguing for a new song, Raskin echoed House Speaker Jones, who said earlier this summer that she wanted to get rid of the longtime Maryland anthem. Similar to a plaque in the State House that was sympathetic to the Confederacy, which was removed at her request earlier this year, Jones said she considers the song to be offensive and inappropriate.

“I wanted a song everybody could love and see themselves in,” Raskin said. “For too long, our state song has been the source of disappointment, division and conflict.”

Raskin said he was prompted to launch his “labor of love” by Elise Bryant, a labor organizer, who gushed over Raskin’s rhythmic ­anti-Trump chants at political rallies in recent years.

Bryant said in an interview that she mistakenly thought there was a contest for a new state song.

The legislature will decide in January whether to repeal the song — and, if so, whether to replace it.

Democrats at the meeting on Wednesday appeared to love Raskin’s alternative. So much so that they insisted on hearing it again Thursday, when they convened for their final online meeting of the national convention.

Raskin’s song can be viewed at www.facebook.com/MarylandDemocraticParty/videos/664313407511191.