A photo taken on April 7, 2016, in Munich at the office of the German daily “Sueddeutsche Zeitung” shows several issues of the April 4 edition of the newspaper, in which the “Panama Papers” were published. (Christof Stache/AFP/Getty Images)

There are two parallel worlds in German journalism.

In one, reporters face what they call unprecedented distrust and hatred on the streets — and in some cases even violent assaults. A quarter of Germans agree, according to a recent survey, that “Lügenpresse” — a Nazi era word that means “lying press” — is appropriate to describe the media.

But in the other, the public's trust in the press is at record-high levels. According to a recent study by the University of Würzburg, which tracked more than 15 years of public opinions on the press, 55.7 percent of all Germans trusted the press last year. The researchers suggest that the contentious and sometimes dangerous atmosphere journalists face when covering right-wing protests has not translated into growing media skepticism overall. In fact, the opposite might be the case.

Previous studies have recently come to a similar conclusion, said Martin Hoffmann, a senior researcher at the European Center for Press and Media Freedom. People who are disillusioned with the media hold increasingly hostile views toward journalists, but an unprecedented number of Germans openly disagree with those views.

For Germany's established parties, it could be an encouraging sign. Chancellor Angela Merkel and other mainstream political leaders fear that fake news disseminated on social media could help the far-right Alternative für Deutschland (AfD) party win a large number of seats in the parliamentary election September. Germany's parliament even passed an anti-fake news bill on Wednesday that would compel social media companies to remove untrue stories or face stiff fines.

The study also has warning signs for the AfD and other parties whose supporters have turned away from mainstream media outlets. The Würzburg researchers found indications that the link between populist right-wing parties like the AfD and media skepticism is weakening. The number of respondents in the survey who considered themselves right-wing and said that they trust the press has increased by 18 percent over the last year, rising from 33 percent in 2015 to 51 percent in 2016.

The significant difference is probably related to Germany's refugee crisis, said Hoffmann. In 2015, the country took in almost 1 million refugees and migrants. Critics alleged at the time that almost all media outlets,  including staunchly conservative ones, welcomed the massive influx. The welcoming attitude of many tabloid papers and conservative publications largely faded following the mass sexual assaults in Cologne on New Year's Eve 2015, which were mostly committed by foreign nationals who had only recently arrived in Germany.

Since then, national broadcasters and newspapers have made efforts to take the concerns of their readers seriously amid the growing refugee influx. But Kim Otto, a journalism professor at the University of Würzburg and author of the study, says the news outlets made other changes that also help explain the rise in trust.

“Many of the traditional German broadcasters and newspaper editors responded with more transparency. They invited citizens and critics to get to know how they work,” said Otto — whose findings suggest that the same methods could potentially work elsewhere, including in the United States.

Read more: 

Trump’s attacks on the media sound eerily familiar to Germany’s journalists