Arkansas has carried out its first execution in nearly a dozen years despite a flurry of legal challenges that had spared three other convicted killers.

Ledell Lee was pronounced dead at 11:56 p.m. Thursday, four minutes before his death warrant was due to expire at midnight, capping a chaotic week of legal wrangling. Arkansas originally wanted to put eight inmates to death before the state’s supply of midazolam, one of three drugs used in its lethal injection process, expires at the end of April.

Three of those executions were canceled this week because of court decisions. Another inmate scheduled for execution next week has received a stay.

The state still hopes to put to death two more inmates Monday, and one next Thursday.