Democrats and Republicans managed to come together to update the archaic Electoral Count Act after they recognized it could again be abused to subvert the presidential vote.WASHINGTON — Like most members of Congress, Senator Susan Collins was rocked by the events of Jan. 6, 2021, as a pro-Trump mob stormed the Capitol and violently disrupted the ceremonial tally of presidential electoral votes.Almost exactly a year later, Ms. Collins, Republican of Maine, happened upon an article by a prominent Republican election law expert proposing changes in the way Congress counted electoral votes, in the hopes of preventing a recurrence. She headed into the regular private weekly party luncheon last Jan. 4 and spontaneously raised the idea of overhauling the antiquated 135-year-old law, the Electoral Count Act.She found a ready audience among some fellow Republicans who recognized the threat.“Our system was clearly at risk,” Ms. Collins said of the prospect that ambiguities in the archaic law could again be exploited to try to overturn a presidential election and halt the peaceful transfer of power.There was one significant problem. Senate Democrats had election-related goals of their own aimed at countering attempts at voter suppression in some Republican-led states. They saw the new proposal as a subterfuge intended to sabotage their much broader legislation.As word got out that Ms. Collins, with early encouragement from Senator Mitch McConnell of Kentucky, the Republican leader and always a figure of suspicion among Democrats, was pursuing changes in the electoral count law, the Senate’s top Democrat objected sharply.“The McConnell plan, that’s what it is, is unacceptable, unacceptably insufficient and even offensive,” Senator Chuck Schumer, Democrat of New York and the majority leader, said as he blistered the “cynical” idea on the Senate floor on the anniversary of the Jan. 6 assault. “Score keeping matters little if the game is rigged.”Now, another year later, Congress is poised to approve changes to the law in an effort to better secure the presidential election system that was severely tested when President Donald J. Trump and his supporters sought to exploit uncertainty in the law to hold on to power.Understand the Events on Jan. 6Timeline: On Jan. 6, 2021, 64 days after Election Day 2020, a mob of supporters of President Donald J. Trump raided the Capitol. Here is a close look at how the attack unfolded.A Day of Rage: Using thousands of videos and police radio communications, a Times investigation reconstructed in detail what happened — and why.Lost Lives: A bipartisan Senate report found that at least seven people died in connection with the attack.Jan. 6 Attendees: To many of those who attended the Trump rally but never breached the Capitol, that date wasn’t a dark day for the nation. It was a new start.It took the efforts of a bipartisan group of 15 senators, months of intense negotiations, the endorsement of outside experts aligned with both parties and a stark realization that the outdated law could again be misused if changes weren’t made. And the results the next time could be worse.“It has been lying there like unexploded ordnance since 1887,” said Bob Bauer, an election law specialist who had served as White House counsel to President Barack Obama, referring to the existing law. “It just cried out for attention.”It also required an acceptance by Democrats that the law needed to be strengthened even if they could not obtain much broader voter protections they were pursuing. Democrats failed in that push because of Republican resistance and a refusal by two Democrats to eliminate the filibuster to impose the voting changes.Congress is poised to approve changes to the law in an effort to assure that it cannot be used to subvert the counting of electoral votes.Kenny Holston/The New York Times“It finally got down to what can we do truly to address this horrific insurrection,” said Senator Joe Manchin III of West Virginia, Ms. Collins’s initial bipartisan partner in the effort. “How do we prevent this from ever happening again? And that’s really how we got down to the basics.”Under the legislation, which was deemed urgent enough to be added to the huge year-end spending bill now heading toward final approval, the role of the vice president in overseeing the quadrennial counting is spelled out as strictly ceremonial. That provision was a response to Mr. Trump’s unsuccessful effort to convince Vice President Mike Pence that the law gave him the power to reject electoral votes from some states and block or delay certification of Joseph R. Biden Jr.’s victory in the 2020 election.The new legislation also raises the threshold for objecting to a state’s electoral votes to one-fifth of both the House and Senate. Until now, just one House member and one senator could force the House and the Senate to consider objections, and members of both parties have raised objections over the years with little to no evidence to back them up. The legislation also seeks to prevent competing slates of electors from being presented to Congress.The article that spurred Ms. Collins was written by Ben Ginsberg, a well-known Republican election lawyer who served as counsel to the 2000 presidential campaign of George W. Bush and was deeply involved in the Florida recount.He argued in National Review that Republicans and even Mr. Trump himself should want the law rewritten because the Jan. 6 assault had essentially provided a “blueprint” for future efforts to undermine an election, noting that in 2024 a Democratic vice president would be presiding over the counting of the ballots.After opening the door to a potential rewrite, Ms. Collins immediately began meeting with a core group of senators who are typically part of bipartisan Senate efforts, including Mr. Manchin, the Democrats Jeanne Shaheen of New Hampshire and Kyrsten Sinema of Arizona (now an independent), and the Republicans Mitt Romney of Utah and Thom Tillis of North Carolina.The group quickly expanded to include the Republicans Todd Young of Indiana, Rob Portman of Ohio, Lisa Murkowski of Alaska, Ben Sasse of Nebraska and Shelley Moore Capito of West Virginia, along with two more Democrats, Chris Coons of Delaware and Mark Warner of Virginia.As their work was proceeding behind the scenes, Democrats were pushing ahead with an ambitious plan to counter what they saw as a pervasive effort in Republican-led states to make it more difficult to vote after an expansion of vote-by-mail efforts and other pandemic-releated changes led to Democratic victories in 2020. Democrats said the state voting law changes were aimed mainly at minorities, and President Biden infuriated Republicans when he referred to the new laws as “Jim Crow 2.0.”The Democratic legislation encountered united Republican opposition in the Senate and died after Mr. Manchin and Ms. Sinema refused to support a change in Senate rules to gut the filibuster. Mr. Manchin said he sought to incorporate some of the more general electoral provisions in the rewrite of the electoral count law but was rebuffed by Republicans.Ms. Collins said the bipartisan group needed to remain focused on the electoral count or risk a shattering of the coalition.“If we got sidetracked and started re-litigating the Voting Rights Act, we would lose the Republican support, and the effort would go nowhere,” she said in an interview. “And an opportunity to really make a difference in future presidential elections would be lost.”With Democrats unhappy about the fate of their broader bill, Ms. Shaheen encouraged Ms. Collins to add more Democrats to the group to increase chances that Democrats could ultimately be persuaded to back it. Senators Christopher S. Murphy of Connecticut and Benjamin L. Cardin of Maryland, both Democrats, came aboard as Ms. Collins said she realized she needed to broaden the ideological base “beyond the usual suspects.”Senator Joe Manchin III, Democrat of West Virginia, said he unsuccessfully sought to incorporate some of the more general voting rights provisions favored by his party in the rewrite of the electoral count law.Kenny Holston/The New York TimesMs. Shaheen said she suggested “that having them involved from the beginning in the discussion would be very helpful in persuading the rest of the Democratic caucus that this was a serious effort and we needed to do this even though we couldn’t get some of the changes people wanted.”Members of the bipartisan group also kept in regular contact with the leaders of the Rules Committee, Senator Amy Klobuchar of Minnesota, the Democrat who leads the panel, and Senator Roy Blunt of Missouri, its top Republican, to ease the way for the panel’s review of the legislation and avoid criticism they were operating outside of normal channels.Ms. Collins also briefed top White House officials on the legislation to assure them it was both in good faith and a necessary effort. And the group enlisted respected legal experts like Mr. Bauer and Jack Goldsmith, a Harvard Law School professor and a senior lawyer in the administration of George W. Bush, to advise the lawmakers and publicly back the legislation.The Rules Committee ultimately voted 14 to 1 on Sept. 27 to send the legislation to the floor with just Senator Ted Cruz, Republican of Texas, objecting and Mr. McConnell voting in favor. Even Mr. Schumer got on board despite his early skepticism.“I worked to get this legislation included in the omnibus because we must prevent the electoral count process from being used as a trigger point for insurrection again,” said Ms. Klobuchar, adding that Senate approval means “we are one step closer to protecting our country from the chaos we saw on Jan. 6.” More