By Brian Witte, Associated Press

ANNAPOLIS, Md. (AP) — Maryland’s highest court on Wednesday affirmed a special magistrate’s recommendations not to change the state’s legislative map, which was challenged on constitutional grounds.

The Maryland Court of Appeals issued an order confirming that the state’s primary will take place on July 19. The order also notes that Friday at 9 p.m. is the deadline for candidates to file to run. The order came just hours after lawyers gave oral arguments over the constitutionality of the state’s legislative map.

READ MORE: Video Shows Squeegee Worker Assaulting A Driver At Busy Baltimore Intersection

The map designates boundaries for 188 seats in the state legislature and was approved in January by the General Assembly, which is controlled by Democrats, despite claims of gerrymandering. Attorneys for Republican lawmakers focused on the lack of compactness of certain districts in the middle of the state.

In the order, the court determined the plan enacted into law in January “is consistent with the requirements of the Constitution of the United States and the Constitution of Maryland.”

Strider Dickson, an attorney for the plaintiffs who include several Republican lawmakers, had asked the court to direct the General Assembly to redraw the map to correct any deficiencies the court found, or appoint a special master to draw districts or adopt a separate map supported by Republican Gov. Larry Hogan.

Ann Sheridan, an assistant attorney general who defended the map, said the case is based on the shape of the districts — and that alone doesn’t provide compelling evidence that the constitution has been violated. She also noted that the map is based on prior districts, drawn in accordance to the law.

“If the court were to accept petitioners’ argument, you essentially would be throwing out the rule book,” Sheridan said.

READ MORE: Maryland Weather: Tornado Watch Canceled For Maryland, Severe Thunderstorm Warning Remains

Sheridan also argued that if the court forced lawmakers to redraw the map, “what the court is doing is taking away from the legislature that which rests with them under the constitution.”

“These are political decisions,” Sheridan said. “These are decisions that should be made by the political branches, not by the court.”

Alan Wilner, a retired Court of Appeals judge who reviewed the map as a special magistrate in the case, concluded in a report filed last week that while compactness of districts is important, it’s not the only factor. He also noted that the state’s primary, already once delayed due to court challenges, is scheduled for July 19.

“The problem is one of time,” Wilner wrote, adding that changing the map so close to the primary “can create as much mischief as it resolves.”

Democrats had previously also approved the state’s congressional map, but a judge struck down the state’s congressional map in March, concluding it was a “product of extreme partisan gerrymandering.” The legislature redrew the map to make the eight U.S. House districts more compact, and Hogan signed the legislation last week.

MORE NEWS: Hogan Vetoes 18 Bills, Including Ballot Signature Measure

This is a big election year in Maryland. 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.