The gradual exiling of the Confederate flag from America has picked up fresh momentum following a vote in the US Congress to ban it - more or less - from national cemeteries.

Diving headlong into a debate that has frayed emotions in southern states in particular, the House of Representatives passed a provision that would forbid flying large Confederate flags in national graveyards, including over mass graves, at all times. Families would be able to place the flags on specific graves if they are very tiny and only on two national holidays.

The measure, which came as an amendment to a larger veterans’ affairs and military bill, was passed with overwhelming support from Democrats. Among the chamber’s Republican majority, 84 joined in voting for it while more than 150, mostly from conservative southern states, voted against. However, it cannot become law until it also wins support in the US Senate.

The controversy over the flag and its associations with the enslavement of African Americans and with racism hurtled back to the fore in the aftermath of a white supremacist killing the pastor of a historic church in Charleston, South Carolina, and eight other worshipers last June.

“Over 150 years ago, slavery was abolished,” said Representative Jared Huffman, a California Democrat, who proposed the amendment. “Why in the year 2016 are we still condoning displays of this hateful symbol on our sacred national cemeteries?”

After the Charleston massacre, the Governor of South Carolina, Nikki Haley, who is a Republican, helped push her state to lower the flag for ever from the grounds of its Capitol in Columbus. “That flag, while an integral part of our past, does not represent the future of our great state,“ she said at the time. It also came down in Alabama and has recently been removed from the campus of the University of Mississippi.

In the Deep South popular opinion about the fate of the flag is still divided, its defenders arguing that its gradual demise is a product of political correctness and a refusal to honour history and those who fell fighting for the Confederacy during the American Civil War of 1981 to 1865.

What many people recognise as the Confederate flag - a square banner with a blue cross with white stars against a red background - was in fact a battle flag of the Confederacy.

While no one spoke out against the amendment on Capitol Hill in Washington on Thursday, the legislative director of Representative Lynn Westmoreland, a Republican from Georgia, made a vivid appeal ahead of time to fellow Republicans to reject it.

“You know who else supports destroying history so that they can advance their own agenda? [The Islamic State]. Don't be like ISIL.” He signed the email as “Yours in freedom from the PC police.”

The Congressman from Georgia appeared later to be embarrassed by his office’s implied comparison of Democrats with ISIL, the official acronym of the US government for Isis.

“Representative Westmoreland does not condone this type of language from his staffers. While this email was intended to be between colleagues and not for public distribution, that type of unprofessional language should not have been used and appropriate disciplinary measures against the staffer have been taken to ensure this does not happen again,” spokeswoman Leigh Claffey said.

An attempt by Democrats to sneak through a flag amendment by attaching it to a major budget bill failed at the last hurdle last year when inattentive Republicans woke up to what happened. That it was allowed to go through this time was a sign that the House has become more open and democratic in how it functions, House speaker Paul Ryan contended.