Three vials of pentobarbital that Virginia received in August. The purchase order says they were supplied by the Texas Department of Criminal Justice.

The state of Texas is making its own execution drugs and has sold them to at least one other death penalty state, an inmate facing execution in Oklahoma alleges in a court filing Thursday. His attorneys point to documents that show the Texas Department of Criminal Justice sold pentobarbital to Virginia in late August.

Pentobarbital is a sedative that many death penalty states, including Oklahoma, have claimed is impossible for them to get their hands on. As a result, some states have turned to midazolam, a drug that critics argue is significantly less effective. The U.S. Supreme Court upheld the use of midazolam in executions this June.

The records submitted as part of the new filing show that Virginia received three vials of the drug. Under the heading "Name of Supplier," the Texas Department of Criminal Justice is listed.

The labels do not identify the pharmacy that prepared the drug. However, the lawyers for the Oklahoma inmate state that the labels were created by the Texas Department of Criminal Justice, which they also allege "is compounding or producing pentobarbital within its department for use in executions."

On Friday, Texas confirmed to BuzzFeed News that it sent the execution drugs to Virginia. A spokesman said it was to repay Virginia for having given Texas drugs in the past.

"In 2013, the Virginia Department of Corrections gave the Texas Department of Criminal Justice pentobarbital to use as a back up drug in an execution," spokesman Jason Clark said. "Virginia's drugs were not used."

"The agency earlier this year was approached by officials in Virginia and we gave them 3 vials of pentobarbital that [were] legally purchased from a pharmacy. The agency has not provided compounded drugs to any other state. Texas law prohibits the TDCJ from disclosing the identity of the supplier of lethal injection drugs."