Congress passed a proposal to limit the presence of Confederate flags in national cemeteries Thursday.

>> Read more trending stories  

The 265-159 vote effectively bans the display of the battle flags at cemeteries that the Department of Veterans Affairs oversees.

The amendment makes it illegal to display the bars and stars, even if the soldier being honored fought for the Confederate States Army.

Rep. Jared Huffman, from California, introduced the proposal as an amendment to a VA spending bill.

"Over 150 years ago, slavery was abolished. Why in the year 2016 are we still condoning displays of this hateful symbol on our sacred national cemeteries?" Huffman said.

Almost every Democrat and 84 members of the GOP supported the new restriction, while 158 Republicans voted against the amendment.

No one spoke to oppose the restriction during floor debate.

But The Hill reported a top staffer for Rep. Lynn Westmoreland, from Georgia, was disciplined after sending out a mass email comparing efforts to ban the flag to the Islamic State group's "cultural cleansing."

The vote comes nearly one year after the church shooting in Charleston, South Carolina, renewed the national debate about displaying the flag.