Prisoners have set fire to a jail in Turkey's earthquake-hit city of Van and gunshots have been heard as inmates fought their guards following a big aftershock.

A soldier said prisoners had attacked the guards with scissors and knives, two days after 200 people are reported to have escaped in the chaos after Sunday's quake.

Reuters journalists saw flames at the building and white smoke billowing into the night sky, before half a dozen shots rang out.

"The prisoners lit a fire when they weren't let out of their cells following the big aftershock," a local government official, who declined to be named, said. "They were angry."

The magnitude 5.4 aftershock shook the region just before 6:00pm local time on Tuesday, spreading panic among survivors of Sunday's quake.

More than half a dozen mini-buses ferried soldiers into the prison compound, while ambulances waited outside.

One soldier helped a bloodied comrade who was brought out of the prison to be treated for cuts.

"These shameless people. They threw scissors at him," he said while his friend was being treated.

"They have everything inside, knives, daggers, everything. There's a whole gang of them."

There was tension and panic among onlookers, some of them relatives of the inmates, who had congregated outside the jail.

"They're burning inside. They're burning alive," screamed one man, before he was calmed down.

Police pushed back the crowd as it swelled to around 200 people.

Turkish media had reported 200 prisoners escaped on Sunday after the quake brought down a perimeter wall, but 50 returned after visiting relatives to check on their safety.

Deputy prime minister Besir Atalay, who is overseeing relief operations in Van, has said he was unsure how many inmates had escaped and how many had come back.

Officials played down the size of the jailbreak, saying the media reports were exaggerated.

"Some inmates went out of the prison yard after the wall collapsed to see their families, and they returned after seeing them," Prison and Correctional Facilities general manager Sefa Mermerci told state-run news agency Anatolian.

Reuters