Finding affordable student housing in many German university cities may prove more difficult this year than in the years before, according to a new study by the Moses Mendelssohn Institute (MMI).

In cooperation with the GBI real estate firm and the real estate portal WG-Gesucht.de, and with a focus on towns with universities that have more than 5,000 students, the MMI came up with a ranking that factors in competition for rooms, rent increases, quantity of available space and student numbers.

The MMI study finds that the situation is critical in 19 German university cities.

The Bavarian capital Munich was rated the worst for students to find housing, followed by Frankfurt and Cologne.

Too much competition

"Since 2013, the strain on student housing has risen continually - in the big cities and the internationally recognized university towns the trend has been way above average," MMI director Stefan Brauckmann said.

Hamburg, Stuttgart and Darmstadt are also on the list of cities where students have a tough time finding affordable housing.

Competition is lively to say the least, with students increasingly flocking to Germany from abroad, and to the country's many university towns from other parts of Germany. The fierce competition has also led to soaring rents. One room in a shared apartment or house - the most common form of student housing in Germany - costs on average 349 euros ($ 391) per month this year, up from 330 last year, the study finds. In Munich, the average student rent is a whopping 560 euros, while student rooms in eastern German university towns rent for less than half: 262 euros per month.

While the study says the situation deteriorated in 52 cities, students might find apartment-hunting easier this year in seven of the 91 cities rated - including in Hanover, Kassel, Münster and Wurzburg.