McALESTER, Okla. — What was supposed to be the first of two executions here on Tuesday night was halted when the prisoner, Clayton D. Lockett, began to writhe and gasp after he had already been declared unconscious and called out “oh, man,” according to witnesses.

The administering doctor intervened and discovered that “the line had blown,” said the director of corrections, Robert Patton, meaning that drugs were no longer flowing into Mr. Lockett’s vein.

At 7:06 p.m., Mr. Patton said, Mr. Lockett died in the execution chamber, of a heart attack.

Mr. Patton said the governor had agreed to his request for a stay of 14 days in the second execution scheduled for Tuesday night, that of Charles F. Warner.

It was a chaotic and disastrous step in Oklahoma’s long effort to execute the two men, overcoming their objections that the state would not disclose the source of the drugs being used in a newly tried combination.