Pius XII has long been vilified as "Hitler's pope", accused of failing publicly to condemn the genocide of Europe's Jews. Now a British author has unearthed extensive material that Vatican insiders believe will restore his reputation, revealing the part that he played in saving lives and opposing nazism. Gordon Thomas, a Protestant, was given access to previously unpublished Vatican documents and tracked down victims, priests and others who had not told their stories before.

The Pope's Jews, which will be published next month, details how Pius gave his blessing to the establishment of safe houses in the Vatican and Europe's convents and monasteries. He oversaw a secret operation with code names and fake documents for priests who risked their lives to shelter Jews, some of whom were even made Vatican subjects.

Thomas shows, for example, that priests were instructed to issue baptism certificates to hundreds of Jews hidden in Genoa, Rome and elsewhere in Italy. More than 2,000 Jews in Hungary were given fabricated Vatican documents identifying them as Catholics and a network saved German Jews by bringing them to Rome. The pope appointed a priest with extensive funds with which to provide food, clothing and medicine. More than 4,000 Jews were hidden in convents and monasteries across Italy.

During and immediately after the war, the pope was considered a Jewish saviour. Jewish leaders – such as Jerusalem's chief rabbi in 1944 – said the people of Israel would never forget what he and his delegates "are doing for our unfortunate brothers and sisters at the most tragic hour". Jewish newspapers in Britain and America echoed that praise, and Hitler branded him "a Jew lover".

However, his image turned sour in the 1960s, thanks to Soviet antagonism towards the Vatican and a German play by Rolf Hochhuth, The Deputy, which vilified the pope, accusing him of silence and inaction over the Jews. It was a trend that intensified with the publication of Hitler's Pope, a book by John Cornwell.

However, as the Vatican's secretary of state before the war, the future pope contributed to the damning 1937 encyclical of Pius XI, With Burning Anxiety, and, as Pius XII he made condemnatory speeches that were widely interpreted at the time – including by Jewish leaders and newspapers – as clear condemnations of Hitler's racial policies. Due to the Vatican's traditionally diplomatic language, the accusation that Pius XII did not speak out has festered.

Professor Ronald J Rychlak, the author of Hitler, the War and the Pope, said: "Gordon Thomas has found primary sources … He has tracked down family members, original documentation and established what really was a universal perception prior to the 1960s. He's shown what the people at the time – victims, rescuers and villains – all knew: that Pius XII was a great supporter of the victims of the Holocaust."

Asked why the Vatican had not made the new material available until now or, where stories were known, disseminated them more widely,Thomas said: "The church thinks across centuries. If there's a dispute for 50 years, so what?"

William Doino, a Vatican historian, described Thomas's research as "unique and groundbreaking". He spoke of the book's new insight, for example, into Hugh O'Flaherty, an Irish priest: "Everybody has always praised [O'Flaherty] because he helped Jews and escaped POWs. They made a movie about him, The Scarlet and the Black, with Gregory Peck. However, they always say he was acting on his own authority and that Pius was either aloof or not giving him anything. Gordon has spoken extensively with O'Flaherty's family, who gave him private correspondence and told him that O'Flaherty said that everything was with Pius XII's co-operation."

The book also tells the story of Vittorio Sacerdoti, a young Jewish doctor who was able to work in a Vatican hospital, inventing a fictitious deadly disease that deterred Germans from entering. Dozens of fake patients were taught to cough convincingly.

Thomas interviewed Sacerdoti's cousin, who recalled that as a child she was one of those patients – "feeling there was nothing wrong with her, yet having to cough regularly in the ward".

The Vatican is so excited by The Pope's Jews that it is supporting a feature documentary film being planned by a British producer who has bought the rights to it.

Allen Jewhurst, who has produced documentaries for BBC TV's Panorama, said that, with more than a billion Catholics worldwide, interest in the story is huge. After a meeting with two cardinals at the Vatican, he and Thomas now hope to get exclusive access to the archives. "This will, hopefully, be a definitive film," said Jewhurst.

Thomas, who also wrote the book Voyage of the Damned, about Jewish refugees, recalled: "The Vatican people said, 'How wonderful, the truth out at last'."

"The Pope's Jews: The Vatican's Secret Plan to Save Jews from the Nazis" is published by The Robson Press on 7 March