AFTER A TESTY battle that lasted for several days, Republicans and Democrats in the Massachusetts House have agreed to a compromise on rules that will allow them to debate bills and vote remotely.

The House on Monday adopted the temporary emergency rules and planned to meet Wednesday in a full formal session, with remote participation, for the first time since the coronavirus outbreak began.

The agreement resolved a heated standoff in which leaders of the chamber’s Democratic super-majority and Republican caucus traded unusually sharp jabs, as tempers boiled over on how best to proceed with lawmaking amidst the pandemic.

Formal sessions are the only way lawmakers can take roll call votes, which are required to pass certain spending bills, and pass bills that do not have unanimous support. Until now, all legislative work has been done in informal sessions, where only a few lawmakers attended and a single objection could derail a bill. The new rules will let members watch a live stream of the proceedings and call in to debate and vote by telephone.

House Speaker Robert DeLeo said the order on the rules “is the result of hours of work, discussions, and research.”

“The Temporary Order passed today strikes a careful balance of safety, security, and equitable access so that Members can meaningfully participate and perform their duty of representing their constituents,” DeLeo said in a statement. “We look forward to taking up and debating important items that require formal votes in the sessions ahead.”

The temporary rules were first proposed by Democratic House leaders last Monday evening and immediately drew fire over provisions that would raise of the threshold for roll call votes. DeLeo agreed to withdraw that provision. But Republicans then objected to provisions governing how much members could speak.

The earlier version of the rules had required anyone wishing to speak on a bill or amendment to sign up by 10 a.m. that morning. They could speak only once per question. Only the member carrying the bill – defending it on the House floor – could speak multiple times. House Minority Leader Brad Jones objected that this would stifle debate and limit members’ ability to respond to questions or comments made during the debate.

DeLeo had been threatening to call lawmakers back to the State House to vote on the rules, despite the dangers of gathering during a pandemic, if a compromise could not be reached with Jones by Monday. He called the Republican moves last week examples of “recklessness and fiscal irresponsibility.”

Jones, meanwhile, charged that Democrats wanted to turn the House “into the place where democracy dies.”

The compromise, which was introduced by Rules Committee chairman Rep. William Galvin on Monday during an informal session and passed by the members who were present, would expand the number of people who could speak an unlimited number of times to include, in addition to the member carrying the bill, the House minority leader and the ranking minority member of the committee the bill emerged from.

The compromise also adds that after everyone who signed up speaks, the primary sponsor of a bill or amendment or their designee could be recognized again to provide a rebuttal or further explanation. A member of the opposing political party could then respond. These members would be limited to speaking for five minutes.

Jones could not immediately be reached for comment.

The passage of the rules sets the House up to consider a bill introduced by Gov. Charlie Baker that would let Treasurer Deborah Goldberg borrow money this fiscal year to deal with any shortfall created by pushing off the state’s income tax filing deadline.

Sen. Cynthia Creem, a Newton Democrat who chairs a Senate task force looking at legislative process, has said senators are considering resuming formal sessions June 1. But the Senate has set up a process to pass the borrowing bill, which would let senators vote in person, from their offices, or from home by sending a letter to the clerk authorizing another senator to vote on their behalf.