FRANKFORT, Ky. — A judge has unsealed records from a Kentucky lawsuit against the maker of the prescription painkiller OxyContin, including the secret testimony of a former company president.

Pike Circuit Court Judge Steven Combs ordered the records be released in 32 days. But Combs said he would delay his order if Purdue Pharma appealed the decision. Richard Silbert, the company’s chief litigation counsel, confirmed it would appeal. He declined further comment.

OxyContin is a powerfully addictive prescription painkiller that was marketed for its ability to slowly release its effects over a 12 hour period. The company suggested this long-acting formula made it less addictive and safer for patients. But users quickly found the pill lost its time-release qualities if it was crushed, resulting in an instant high.

In 2006, the company agreed to plead guilty and pay more than $630 million to settle federal charges that it misled doctors and patients about the risks of its top-selling drug. The company released a new version of the drug in 2010 that they said deters abuse.

Kentucky was particularly affected by the drug, as it was prescribed to many injured coal miners in the eastern part of the state. In 2007, Kentucky’s attorney general filed a separate lawsuit against Purdue Pharma. Both sides settled the case in December and the company agreed to pay Kentucky $24 million.

But the lawsuit generated more than 17 million pages of documents, including marketing strategies, training manuals, instructions to sales representatives and testimony from company officials. The records include a deposition of Dr. Richard Sackler, a former Purdue Pharma president.