TALLAHASSEE — The Florida Supreme Court ruled Thursday that secret documents used in the high-profile redistricting case should be unsealed.

"We affirm the trial court's ruling requiring production of the 538 pages of disputed documents," the justices wrote in a rare unanimous ruling. "For all these reasons, and in accordance with the overriding public interest in openness to judicial proceedings and records, we direct that the sealed portions of the trial transcript, as well as the sealed documents themselves, should be and hereby are ordered unsealed."

The documents won't be available any earlier than Nov. 20. That's the deadline for Republican political consultant Pat Bainter to ask the Supreme Court for a rehearing.

Bainter, who has been battling to keep the documents private for two years, said he was reviewing the opinion and considering his options.

The ruling was a victory for a coalition of voters rights groups that had requested the documents as part of a legal challenge to the Florida Legislature's 2012 redistricting plan.

David King, who represents the coalition, said the opinion would "finally force sunshine into the shadow process that has robbed the citizens of Florida of their right to fair representation in Congress."

The voters rights groups, led by the League of Women Voters, filed the initial lawsuit in 2012, alleging the Republican-dominated Legislature had drawn a congressional map that favored incumbents.

Circuit Court Judge Terry Lewis rejected the map in July. He had harsh words for Republican consultants, who he accused of conducting a "secret, organized campaign" to create gerrymandered districts.

During the court proceedings, Bainter was asked to provide any emails he had sent or received regarding the redistricting process. He delayed at first, saying the documents were irrelevant, according to Thursday's opinion. He later fought to keep the documents sealed on the grounds that their release would violate his First Amendment right to anonymous political speech.

The Miami Herald was among several other news organizations that filed a friend of the court brief requesting to have the documents disclosed.

When the Supreme Court heard Bainter's case in September, he described the hearing as "a legal assault and press sensationalism as to whether or not I, a private citizen, have the right to petition my government without fear of a political inquisition into my private matters."

In a narrow ruling Thursday, the Supreme Court said Bainter had waited too long to assert his First Amendment rights.

"Not until the day after the trial court held (Bainter and his firm) in contempt of court and ordered them to pay attorney's fees for failing to produce the documents did the words 'First Amendment' appear for the first time in a filing or a hearing transcript," the justices wrote.

They called the delay "inexcusable."

John Mills, a lawyer who represented the League of Women Voters, said he was "particularly gratified" that all seven justices had concurred in the decision.

"Regardless of whether you are liberal, conservative or neutral, all can agree that our judicial system has no room for the kinds of games Mr. Bainter has been playing," Mills said.

Contact Kathleen McGrory at kmcgrory@MiamiHerald.com.