BERLIN, June 15 (Reuters) - Islamophobia has risen markedly in Germany, a study published on Wednesday showed, underscoring the tensions simmering in German society after more than one million migrants, mostly Muslims, arrived last year.

Every second respondent in the study of 2,420 people said they sometimes felt like a foreigner in their own country due to the many Muslims here, up from 43 percent in 2014 and 30.2 percent in 2009.

The number of people who believe Muslims should be forbidden from coming to Germany has also risen, the study showed, and now stands at just above 40 percent, up from about a fifth in 2009.

The study was conducted by researchers at the University of Leipzig in co-operation with the Heinrich Boell Foundation, the Rosa-Luxemburg Foundation and the Otto-Brenner foundation.

The influx of migrants has fuelled support for the anti-immigrant Alternative for Germany (AfD) party that wants to ban minarets and the burqa and has described Islam as incompatible with the German constitution.

The number of attacks on refugee shelters has also risen.

Supporters of the AfD were most likely to favour stopping Muslims from coming to Germany while Green voters were most likely to disagree with the statement that Muslims made them feel like foreigners, the survey found.

On Monday German President Joachim Gauck warned against demonising Muslims and against polarisation along religious and ethnic lines in German society when he joined a Ramadan dinner in Berlin.

Germany is home to nearly four million Muslims, about five percent of the total population. Many of the longer established Muslim community in Germany came from Turkey to find work, but those who have arrived over the past year have mostly been fleeing conflicts in Syria, Iraq and Afghanistan.

The study also examined extreme right-wing views towards other groups in Germany.

"While general prejudice against migrants fell slightly, the focus of resentment towards asylums seekers, Muslims as well as Sinti and Roma, increased," the study's authors said.

The number of those surveyed that believed Sinti and Roma peoples tended towards criminality rose to nearly 60 percent, while slightly more than 80 percent of respondents wanted the state not to be too generous when examining asylum applications.

Almost 40 percent of those surveyed in east Germany agreed with the statement that foreigners only came to Germany to take advantage of its social welfare benefits, compared to about 30 percent of those in the west of the country.

(Reporting by Caroline Copley; Editing by Gareth Jones)

Our Standards: The Thomson Reuters Trust Principles.