They came to Spain fired by passion and ready to fight for their ideals, though their weapons were notebooks, battered typewriters and cumbersome cameras.

For a generation of writers and journalists who poured into Spain as a bloody civil war broke out in 1936, the battle was about much more than column inches of newsprint, headlines or personal glory.

Seventy years later, the ideological fervour that drove intellectuals from across the globe to Spain is being commemorated in an exhibition devoted to Ernest Hemingway, George Orwell, Martha Gellhorn and a host of others for whom this was a key moment in their lives.

"This is the most painful story it has ever been my lot to handle," wrote the Chicago Tribune's Jay Allen on a July morning in 1936, telling the world about one of the war's bloodiest massacres. "They are burning bodies. Four thousand men and women have died at Badajoz since Gen Francisco Franco's rebel Foreign Legionnaires and Moors climbed over the bodies of their own dead through its many times blood-drenched walls."

The Spanish civil war was fascism's first big military outing and a curtain-raiser for the second world war.

"The journalists didn't just come to exercise their profession but to fight for their ideas," said Carlos García, curator of the exhibition at Madrid's Cervantes Institute. "It was a war in which the future models and values of society were at stake."

Mussolini and Hitler backed Franco's uprising against an elected leftwing government. Stalin, in turn, sent military advisers and sold arms to the republic. Britain and France, scared of communism and already appeasing Hitler, sat on the non-interventionist fence.

Orwell took up arms for the republic. Arthur Koestler was locked up by Franco's Falangist supporters. Young British poets and writers such as John Cornford and Julian Bell died driving ambulances or wearing the uniform of the International Brigades. Others, such as WH Auden, wrote poems for the republican cause.

For some, including the spy and Times reporter Kim Philby, the experience deepened their attachment to communism. Others, such as Koestler and Orwell, felt the sort of disillusionment that inspired the latter's Animal Farm.

Ideological differences between newspapers often dictated how stories were reported. Thus the Daily Mail's Harold Cardozo offered "the first full story from the lips of the heroic defenders themselves" after Franco relieved rebel troops besieged in the Alcazar fortress at Toledo. There was also backbiting along surprisingly familiar lines, with Orwell slating reports of "hecatombs of nuns who have been raped before the eyes of Daily Mail reporters". Writers decribed a new kind of warfare, in which aerial bombardment brought added danger. Only five correspondents died, although the dangers were real enough. As Virginia Cowles wrote in the New York Times magazine: "If your number is up, it's up, so why worry?"