ANNAPOLIS, Md. (AP) — Maryland Gov. Larry Hogan approved a new congressional map Monday with more compact districts, after a judge struck down a previous map 10 days ago for being a “product of extreme partisan gerrymandering.”

The Republican governor, who has long pushed for redistricting reform, described the new map as a “huge improvement” over the one approved over his veto in December by the General Assembly, which is controlled by Democrats.

“This is something that we’ve been focused on for eight years,” Hogan told reporters after signing legislation with the newly drawn political boundaries. “It’s a tremendous victory for democracy and for free and fair elections in Maryland. When these maps came out in December, I said they were unconstitutional and violated the law.”

With Maryland’s primary set for July 19, leaders in the legislature said voters, candidates, and election officials need to have certainty about the congressional district boundaries.

House Speaker Adrienne Jones and Senate President Bill Ferguson, who are both Democrats, said the judge’s ruling contained new legal standards. They said continued delays, and a lack of clear direction in the appeals process were not in the public’s best interest.

“It is the job of the General Assembly to craft new maps after the census that comply with the law. We believe we have now done that with the Congressional map twice,” Jones and Ferguson said in a joint statement. “In the interest of democracy, we have presented the Governor with this new Congressional map and believe it complies with the trial court judge’s brand new legal standards.”

A quickly redrawn congressional map was passed on Wednesday, five days after a judge struck down the one lawmakers approved in December as unconstitutional for diluting Republican votes. It was the first congressional map drawn by Democrats to be struck down this redistricting cycle.

Last week,a judge declared New York’s new Democrat-drawn congressional and legislative district maps unconstitutional. Courts have previously intervened to block maps they found to be GOP gerrymanders in North Carolina, Ohio and Pennsylvania.

In Maryland, where Democrats outnumber Republicans 2-1, Democrats hold a 7-1 advantage over the GOP in the state’s U.S. House seats.

The initial map approved by Democrats over Hogan’s veto made the lone Republican-held district held by Rep. Andy Harris more competitive. The new map takes away a portion that stretched from the Eastern Shore across the Chesapeake Bay into an area with more Democrats.

Republicans have long criticized the congressional map with its long, contorted lines as one of the most gerrymandered in the nation.

The new map for Maryland’s eight U.S. House seats makes the districts more compact.

In her 94-page ruling, Judge Lynne Battaglia found the previous map violated the state constitutional requirement that legislative districts consist of adjoining territory and be compact in form, with due regard for natural boundaries and political subdivisions. It also violated the state constitution’s free elections, free speech and equal protection clauses, she said.

Del. Neil Parrott, a Washington County Republican who brought a lawsuit against the map, said the new map is “a much better map.”

“Now, I still think it’s a gerrymandered map, however it’s much, much better than the one in December,” said Parrott, who is running for Congress in the 6th Congressional District, which had been held by a Republican until the last round of redistricting a decade ago.

Democratic Rep. David Trone, the incumbent in the western Maryland district, described the new map as “a small but important step toward ending partisan gerrymandering.”

“Being disadvantaged by this process is a price I am willing to pay to move Maryland and our country forward,” Trone said in a statement. “What we now need is a national solution — and for all elected officials across the country to get back to dealing with issues important to those we were elected to represent.”

Meanwhile, a special magistrate filed a report Monday rejecting legal challenges to a separate map for state legislative districts. The recommendations from Alan Wilner, a retired judge, go to the Maryland Court of Appeals, the state’s highest court.

“We are not surprised by Judge Wilner’s reasoning in recommending denial of all challenges to the State legislative map,” Jones and Ferguson said. “We closely followed the legal standards that have been developed by the State’s highest court over last three redistricting cycles.”

Doug Mayer, a spokesman for Fair Maps Maryland which is contesting the map, said Wilner’s report “represents the opinion of one person and we strongly disagree with his conclusions.”

The Court of Appeals already had delayed the state’s primary for all elections from June 28 to July 19. This is a big election year: Voters will decide all 188 seats in the state legislature; statewide offices such as governor, attorney general and comptroller; a U.S. Senate seat and all eight congressional seats.