TALLAHASSEE, Fla. — A Florida judge Friday ordered legislators to draw up a new congressional map for the state after the old one was ruled to be illegal.

Circuit Judge Terry Lewis wants the new map by Aug. 15, meaning legislators would have to hold a special session in the next two weeks to comply with the decision. Lewis said he would then consider whether to order a special election later this year under the new map.

The ruling was hailed by the groups that challenged the state’s current districts as unconstitutional. But it’s not known if the Florida Legislature will comply or whether the decision will trigger another round of legal challenges. Florida’s primary is scheduled for Aug. 26.

Representatives for House Speaker Will Weatherford and Senate President Don Gaetz said they were “reviewing” the decision.

Voters in 2010 passed the “Fair Districts” amendment that says legislators cannot draw districts to favor incumbents or a political party. Lewis ruled in early July that two of the state’s 27 districts were drawn illegally to benefit the Republican Party.

That decision sparked a legal battle over what steps to take next.

The League of Women Voters of Florida and the groups that sued the Legislature asked Lewis to adopt a new map and adjust this year’s election schedule. But legislative leaders said the state’s current districts should be kept in place to avoid disrupting the 2014 elections. They also contended only the Legislature has the authority to draw new districts.

In his ruling, Lewis said he found the arguments from legislative lawyers “more sensible” and agreed that the Legislature should be responsible for the new map.

But he said he could not push off a new map until 2016. He said that after further research and evidence, it could wind up that a new map is “not legally authorized or logistically practicable. But I am not there yet.”