Maryland Gov. Larry Hogan signed a redrawn congressional district map into law Monday, ending an unprecedented scramble among lawmakers to craft a new redistricting proposal after the general assembly’s first attempt was thrown out last month.

Anne Arundel County Senior Judge Lynne Battaglia ruled on March 25 that the original map, which the general assembly passed in December after overriding a Hogan veto, was an “extreme partisan gerrymander.” Battaglia set forth a tight timeline for lawmakers to redraw and present their new map, which lawmakers met on Thursday.

Hogan, who had been a vocal critic of the original map, enacted the redrawn proposal after striking an agreement with the Office of the Attorney General. The office had vowed over the weekend to contest the ruling on the original Democrat-backed map in the Maryland Court of Appeals or Court of Special Appeals.

The Office of the Attorney General has formally dropped its appeal effort, making Hogan’s signature cement last week’s redrawing as the state’s new congressional district map for the next decade. Hogan called the compromise “a tremendous victory for democracy and for free and fair elections in Maryland.”

“There was an attempt to say we will draw new maps, but we still want to go back to the gerrymandered unconstitutional maps and we’ll take it to another court,” Hogan said in a news release Monday. “They decided to drop those attempts, and now it’s the law of the land.”

[Maryland judge defers ruling on new congressional map amid rising tension]

Legislative leaders unveiled a new map March 28, and it received approval from both chambers by March 31. Hogan did not act on the map when it reached his desk Thursday, and Battaglia said at a Friday hearing on the redrawn map that she could not rule on the new proposal because the governor had not enacted it.

In a joint statement on the decision to adopt the new map and drop the appeal, House Speaker Adrienne A. Jones and Senate President Bill Ferguson stressed that candidates, voters and election officials needed certainty on what districts would look like.

“The trial judge’s novel interpretation of the Maryland Constitution, continued delays and lack of clear direction in the appeals process are not in the public’s best interest,” the statement read.

Attorney General Brian Frosh reiterated the sentiment in a statement Monday morning.

“This map, like the one previously passed by the General Assembly, is Constitutional and fair. Both sides have agreed to dismiss their appeals, and our state can move forward to the primary election.”

Hogan called on legislative leaders to take action in the future to assure they cannot “go back and continue to cheat and break the Constitution” the next time a redistricting cycle rolls around.

[After intense pushback, Maryland lawmakers redraw congressional district map]

The governor also voiced hope that a similar outcome would prevail in Republican challenges to the state’s legislative redistricting maps created for state delegates and senators.

“The exact same process was done in both cases: it was the backroom, in secret, behind closed doors by the Democratic caucus pushing through these maps,” Hogan said. “I believe hopefully we’re going to be successful there.”

A special magistrate for the Maryland Court of Appeals released a 245-page opinion Monday recommending the court deny all four petitions against the state’s legislative map. The decision came after Republicans alleged in a trial last month that partisan gerrymandering impacts the new legislative districts.

The Court of Appeals will consider the special magistrate’s opinion before handing down a final ruling on the state legislative maps.