Charleston, South Carolina (CNN) Former Attorney General Eric Holder took a veiled swipe at Bernie Sanders Sunday, urging worshipers at Mother Emanuel AME Church in Charleston to hold politicians who have stood against gun reform accountable at the ballot box.

"Those who we elect must be held accountable (on guns)," said Holder, who attended the service as a surrogate for Hillary Clinton. "Those who will not stand with us, those who have not stood with us, must be held accountable."

Holder's comment came from the pulpit of the church that was the site of the 2015 Charleston shooting that left nine people dead. Sanders also attended Sunday's service with his wife, Jane, and activist Cornell West.

Holder did not mention Sanders or Clinton during his remarks, but the gun refrain is consistent with charges the Clinton campaign has spent the week leveling against Sanders.

After the two-hour worship service, Holder denied that his comment was directed at the senator, stating his record "speaks for itself."

Read More