Prison officials coaxed three rebellious inmates into freeing the last of their hostages yesterday by promising a transfer to a federal facility in Virginia, then immediately started reneging on the agreement.

The last four of eight hostages who had been held at knifepoint since Tuesday were released before dawn after a black civil rights attorney negotiated a deal with the inmates, who had complained of racism in the North Carolina prison.

But 90 minutes after the smiling, manacled inmates rode off in a van to the Federal Correctional Institute in Petersburg, Va., Correction Secretary James C. Woodard issued a statement saying he would seek their immediate return.

"I made the decision to grant their request for a transfer to the federal correctional institute in Virginia solely to ensure the safe return of our six employes and the other inmates who were taken hostage," Woodard said.

Irving Joyner, a Raleigh civil rights attorney who negotiated the deal with the inmates, said he was "shocked and dismayed" at the state's decision to return the men so quickly.

"They wanted to leave North Carolina and never return," Joyner said. "A couple of guys had been in prisons around the country and they thought the North Carolina prison system was the worst thing they'd ever encountered in their life."