MANCHESTER, New Hampshire — The Democratic National Committee and Bernie Sanders’ presidential campaign struck a deal late Friday to restore the campaign’s access to critical voter data following a dispute that briefly exploded the Democratic presidential primary and threatened to cripple Sanders’ campaign.

The standoff, which ended as quickly as it escalated, emerged after the DNC cut off the Sanders campaign’s access to the party’s voter database when it discovered that Sanders staffers had improperly accessed and downloaded proprietary data belonging to the campaign of Hillary Clinton.

RELATED: Fired Sanders campaign staffer speaks out

Long-simmering tensions suddenly boiled over Friday afternoon as the Sanders campaign filed a lawsuit against the DNC in federal court at the same time the Clinton campaign accused its rival of committing “an act of theft.”

“Our data was stolen,” said Clinton campaign manager Robby Mook, raising the possibility that laws were broken.

Meanwhile, Sanders’ campaign, which at first downplayed the significance of the breach, was preparing to effectively shut down its field operations as organizers began running out of information of voters to contact.

Close video Wasserman Schultz: Sanders lawsuit 'baffling' The Democratic National Committee chair hits back at the Bernie Sanders campaign after it sues over access to voter data. The Democratic National Committee chair hits back at the Bernie Sanders campaign after it sues over access to voter data. share tweet email Embed

But just before Sanders and the DNC were set to appear at hearing related to the lawsuit, the two parties struck a deal.

“The Sanders campaign has now complied with the DNC’s request to provide the information that we have requested of them,” DNC Chairwoman Debbie Wasserman Schultz said in a statement late Friday night. “Based on this information, we are restoring the Sanders campaign’s access to the voter file, but will continue to investigate to ensure that the data that was inappropriately accessed has been deleted and is no longer in possession of the Sanders campaign.”

She added that the campaign had agreed to fully cooperate, reiterating that the data breach was “completely unacceptable.” The Sanders campaign has fired its top data official, with other punishments possible for at least three other aides who accessed the data.

Sanders campaign manager Jeff Weaver told NBC News the DNC had “capitulated” just before the hearing.

“We are extremely pleased that the DNC has reversed its outrageous decision to take Sen. Sanders’ data. The information we provided tonight is essentially the same information we already sent them by email on Thursday,” he elaborated in a statement. “Clearly, they were very concerned about their prospects in court. Now what we need to restore confidence in the DNC’s ability to secure data is an independent audit that encompasses the DNC’s record this entire campaign.”

As the Sanders campaign took the DNC to court and accused them of pro-Clinton bias, outside allies of Sanders pressured the DNC to restore Sanders’ access. MoveOn.org collected 250,000 petition signatures and Democrats for America, which endorsed Sanders Thursday, collected another 100,000. A nurses union backing Sanders planned to protest outside Wasserman Schultz’ congressional office in Florida.

Clinton campaign spokesperson Brian Fallon said the front-runner’s campaign was happy with the resolution, but warned more punitive actions might be necessary.

“We are pleased that the Sanders campaign has agreed to submit to an independent audit to determine the full extent of the intrusion its staff carried out earlier this week, and also to ensure that Sanders’ voter file no longer contains any of the proprietary data that was taken from us,” he said in a statement.

“We believe this audit should proceed immediately, and, pending its findings, we expect further disciplinary action to be taken as appropriate,” he added.

Even with the technical issue resolved for now, the mood is likely to be unusually tense at Saturday night’s Democratic debate here, where the candidates are likely to be asked about the breach. Whether Clinton is as aggressive as her campaign on this issue, and whether Sanders will apologize, remains to be seen and will determine the future trajectory of this issue.