WASHINGTON — The purpose of the bill seemed unassailable: to ensure that state officials could protect their elections against the kind of hacking or interference that has clouded the 2016 campaign.

Although it started out backed by election integrity advocates and powerful senators from both parties, the Secure Elections Act has now all but collapsed.

Lawmakers modified one of the bill’s key provisions after hearing relentless complaints from state officials, prompting many of its advocates to pull their support. Then last week delivered what one of the bill’s co-sponsors called “the gut punch” — the formal meeting to draft the bill before sending it to the floor was abruptly postponed, and the White House offered a statement critical of the legislation later that same day.

No timetable has since been offered to reschedule it, and the election is two months away.

“The message it sends to elections officials is that there isn’t a sense of urgency or priority to get this done,” said Alex Padilla, California’s secretary of state.