UPDATE (February 24): The Oklahoma attorney general's office released more than 7,500 pages of Scott Pruitt's emails and other records on Feb. 22 in response to the district judge's Feb. 16 order. The documents further reveal a coziness between Pruitt and the fossil fuel industry he is charged with regulating as administrator of the EPA. On Feb. 24, the attorney general's office filed a motion for an emergency appeal with the state Supreme Court to block a second release of documents, scheduled for next week. The state Supreme Court has scheduled a hearing on the request for Feb. 28.

An Oklahoma judge on Thursday ordered the state's attorney general, Scott Pruitt, to quickly release thousands of pages of documents after years of delay. The records could reveal details of his relationship with the fossil fuel industry, which he will be in charge of regulating nationwide once confirmed as head of the Environmental Protection Agency.

The ruling, in response to a public records request from an advocacy group, came a day before a planned Senate vote to confirm Pruitt as Donald Trump's chief of the Environmental Protection Agency. The state judge gave Pruitt's office until Tuesday to produce the records.

Senate Democrats who have been seeking some of the same records tried to delay the confirmation vote, arguing that the documents requested could shed light on Pruitt's ties to industries he would be charged with regulating as EPA administrator.

Oklahoma district judge Aletia Haynes Timmons issued the order after agreeing to expedite a lawsuit brought by The Center for Media and Democracy ahead of the confirmation vote. Timmons ruled that "there was an abject failure to provide prompt and reasonable access to documents request by plaintiff."

CMD sued Pruitt earlier this month in Oklahoma state court, saying he had failed to produce public records in response to nine requests the group had submitted dating back to 2015.

Pruitt's office quickly responded to one of those requests, but CMD said the attorney general's office released just a fraction of the 3,000 emails it had identified as pertinent. Timmons gave Pruitt's office until Tuesday to produce the rest of the documents in that request, and 10 days to produce records related to five others.

"Scott Pruitt broke the law and went to great lengths to avoid the questions many Americans have about his true motivations," Nick Surgey, CMD's director of research, said in a statement after the ruling.

Lincoln Ferguson, a spokesman for Pruitt, said in a statement that his office is committed to following the state's open records laws. "In light of that, we are reviewing all of our options in order to ensure fairness to all requestors rather than elevating the importance of some requests over others," he said.

The advocacy group filed the first of the records requests in January 2015, after a report the previous year by The New York Times detailed close ties between Pruitt and fossil fuel companies. In one example, Pruitt sent a letter to the EPA accusing the agency of overestimating the pollution coming from the state's gas wells. He failed to disclose, however, that the letter had been written by lawyers for Devon Energy, a drilling company.

Despite a request by Democrats to delay Pruitt's confirmation vote, the Senate voted 54-46 to move forward, and a final vote is expected on Friday. Democrats are planning to hold the Senate floor through the night and into Friday to protest the vote.

Six Democratic senators on the Environment and Public Works Committee had sent a letter on Wednesday to Judge Timmons, saying Pruitt had been evasive in his testimony and written responses, and had stymied their attempts to obtain information about his industry ties. "Mr. Pruitt has not been forthcoming with information many of us believe to be necessary to evaluating his nomination fully," they wrote. The Senators asked that the judge "consider the Senate's federal interest in disclosure as you assess whether to give Plaintiff full relief and order the prompt disclosure of all documents responsive to its requests."

Pruitt's nomination has drawn condemnation from Democrats and many environmental groups, and more than 770 former EPA employees have signed a letter opposing the nominee.

On Wednesday, Sen. Susan Collins of Maine became the first Republican to say she will vote against confirmation. Republican leaders have remained supportive. On Thursday, Senate Majority Leader Mitch McConnell said Pruitt would correct the overreach of the environmental agency under Barack Obama, calling the nominee "just the candidate we need at the helm of the EPA."