Sheldon Silver, one of New York state's most powerful politicians before his December conviction in a bribery case, had two extramarital affairs while in office, with a lobbyist and with a woman whom he helped get a state job, according to documents unsealed on Friday.

Silver, a Democrat who was speaker of the New York State Assembly, and both women tried to stop the release of the documents. But a federal judge in Manhattan on Thursday ordered the disclosure, saying it was of public interest.

The documents showed that in October, prosecutors asked U.S. District Judge Valerie Caproni to allow them to use evidence at trial about Silver's relationships, saying they were relevant to "the use of his official office for private benefit."

RELATED: Trump talks 'New York values' despite protestors 

In a heavily redacted motion, prosecutors said one of the women was a lobbyist who was often hired to lobby Silver on behalf of clients.

During a recorded conversation on an unspecified date, Silver and the woman discussed how a reporter was calling legislators about whether certain legislators were having affairs, prosecutors said.

Silver responded: "I don't think he caught us."

The second woman, according to prosecutors, had a "long-running extramarital relationship" with Silver, who used his official position to recommend her for a state job.

The evidence about the affairs was ultimately not introduced at trial.

In a joint statement, Silver's lawyers, Steven Molo and Joel Cohen, said: "These are simply unproven and salacious allegations that have no place in this case or public discussion."

One of the women, referred to in court papers as "Sealed Party A," was a "public figure," Caproni said at a hearing on Thursday. That woman hired a prominent lawyer, Abbe Lowell, to fight against having the papers made public.

RELATED: Violent night in Manhattan leaves two dead, suspects at large

Lowell did not immediately respond to requests for comment.

Silver was first elected to the Assembly in 1976. He became its speaker in 1994 and held that position until after he was charged last year.

A federal jury in December found Silver, 72, guilty on charges including fraud, extortion and money laundering. Prosecutors said at trial that he abused his office to collect as much as $4 million in illegal bribes and kickbacks.

Later in December, former New York Senate Majority Leader Dean Skelos was convicted of bribery and extortion in a separate corruption case.

As leaders of the state's two legislative houses, the Democrat Silver and the Republican Skelos were two-thirds of the "three men in a room," along with the governor, who exercise vast power over key legislation.