It was a cruel, bloody and terrifying era. Rebels slaughtered villagers in the mountains and hung dogs from power lines, their carcasses daubed with Maoist slogans. The state responded with a Machiavellian mix of assassination, bribery and intrigue which brought down the rebel leader but also triggered the fall of the president.

Some call that period in Peru's history a successful counter-insurgency. Others call it a cautionary tale about the cost to democracy of fighting terrorism. Others simply call it a nightmare. Whatever you call it, however, there is no denying one thing: it is a great story.

Now, more than a decade after the waning of the Shining Path rebellion, the conflict's legacy is fuelling a literary renaissance. Peruvian writers are blazing a trail through Spanish and English language publishing with books exploring a saga as fascinating as it is painful.

In the past year two of the three top literary prizes in Spanish have been won by novelists from the capital, Lima. Alonso Cueto won the Herralde award for The Blue Hour, about a lawyer who discovers that his naval officer father tortured prisoners. Santiago Roncagliolo received the Alfaguara prize for Red April, which follows a prosecutor's attempt to unravel a murder in Ayacucho, a pre-Inca citadel which became a cradle of the Shining Path in the 1970s.

Daniel Alarcón, who was born in Lima but grew up in the US and writes in English, was shortlisted for the 2006 PEN/Hemingway award for his short story collection, War by Candlelight.

"For a writer this is one of the most stimulating environments you can have. Conflict is the basis of any type of storytelling," said Cueto, seated at a Lima cafe overlooking the Pacific where he does much of his work.

Lima's fog - Herman Melville said it was the saddest city he had ever seen - created an ambiguous atmosphere, said Cueto. "Never dark, never bright, it's somewhere in between."

Founded by a former philosophy professor, Abimael Guzman, the Shining Path waged a 12-year insurrection which claimed 69,000 lives and tapered off after its Maoist leader was captured in 1992. Guzman was found guilty of terrorism and sentenced to life imprisonment at a retrial last October.

President Alberto Fujimori's brutal crackdown was credited with taming the guerrillas, but he fled into exile in 2000 amid allegations of corruption and murder. He is now under house arrest in Chile fighting extradition to Peru. His former intelligence chief, Vladimir Montesinos, who is suspected of organising death squads, is on trial for corruption and drug trafficking.

Peru remains one of South America's poorest countries but is enjoying economic growth and relative political stability and democratic accountability. "Societies can only look at themselves once the trauma has passed, and that's what is happening now," said Cueto. "For example, the great movies about Vietnam came only after the war."

Long regarded as a cultural backwater compared with Buenos Aires or Mexico City, the Peruvian capital is humming with new bookshops and publishing houses, such as Estruendo Mudo, and literary magazines such as Etiqueta Negra, which gives a platform to local writers as well as big foreign names.

"Many people still tell me the magazine doesn't feel Peruvian," the magazine's editor, Julio Villanueva Chang, told the New York Times. "The return of self-esteem in Peru, the overcoming of a feeling of defeat, is something recent."

The country's best known writer, Mario Vargas Llosa, lives abroad but Lima is host to a new wave of writers. "They just love to write books here. It's awash with intellectuals writing about every subject you can imagine," said Jonathan Clare, a British diplomat.

Some think the international acclaim for Peruvian writers reflects an Iraq-related appetite for stories about democracies emerging from civil strife.

Protagonists from Peru's conflict years are returning as characters in novels. Montesinos, the notorious spy chief, features in Cueto's previous novel, Grandes Miradas, about a schoolteacher seeking vengeance for her murdered boyfriend. Roncagliolo is working on a book about Guzman. Alarcon's debut novel, Lost City Radio, is about the search for people lost during a nameless South American country's civil war.

Instead of the magic realism common to many other Latin America novels, the Peruvian novelists tend to favour a more realistic, reflective style befitting a nation noted for brooding solemnity. Even that, however, shows signs of changing among some younger writers who use dreams and rococo imagery.

Dark-skinned Peruvians, who for centuries kowtowed to the Europeanised elite, are more visible and self-confident, turning up in bars and restaurants which once would have barred them.

However, the army of street children which picks through rubbish heaps is a reminder that crushing poverty still endures. An ex-army officer, Ollanta Humala, narrowly lost an election last year which could have set Peru on the road to Venezuela-style leftwing radicalism. Instead Alan Garcia, a disastrous president in the 1980s, was re-elected as a pragmatic centrist. Six months on he has consolidated the fragile democracy but delivered few tangible benefits. His popularity ratings slide as impatience grows.

For Cueto this might be one of the best times for Peru but racism and inequality will keep society on edge. "I'd like for my country not to give me so much material. But I don't think that'll happen for several decades."

Backstory

Remnants of the Shining Path guerrilla movement which terrorised Peru in the 1980s and 1990s have threatened renewed violence if the government does not grant them an amnesty. The small bands of armed fighters no longer threaten the state or espouse a coherent Maoist ideology but they still occasionally ambush security forces, notably last month when five police officers and two drug enforcement agents were killed. The guerrillas have allegedly moved into cocaine trafficking. Founded in 1970 by former philosophy professor Abimael Guzman, the Shining Path's campaign for land reform turned into a war against the state which claimed 69,000 lives, mostly of peasants. Mr Guzman's capture in Lima in 1992 decapitated the movement and the violence ebbed, though the social tensions which fostered the conflict remain.