The perception among some Dunedin people that students are irresponsible and prone to acts of drunken stupidity is not a new one.
In a chapter on student behaviour in his 2006 book, Culture of Change: Beginnings at the University of Otago, Dougal McLachlan wrote that by 1900 the common view among the Dunedin public was that students were ''dissolute and drunken''.
This perception, the author wrote, peaked before and during World War 1, which resulted in the University of Otago taking steps to improve the situation.
Incidents of rioting and couch burnings in the 2000s prompted a similar response from the university and there is general agreement the measures it introduced - including the introduction of a student code of conduct in 2007 - have helped reduce incidents of unruly behaviour.
It is in this environment of improved student behaviour that the at times testy relationship has improved - with Dunedin Mayor Dave Cull and the heads of the university, the Otago University Students' Association and Otago Polytechnic all of the view it was now in good shape.
Mr Cull said the relationship had always been ''pretty good'', but in recent years it had improved to the point where it was ''as good as it's ever been''.
''You wouldn't want even a rash of couch burnings to obscure the fact the relationship between the city and the student body has always been pretty good.
''For a while there, there was some overexuberant behaviour, but that has been very much brought under control and I think largely by self-control,'' he said.
The way students, and the Otago University Students' Association (OUSA), had taken responsibility for improving the situation was a big part of the improvement.
''The student body has been really responsible in the way it has dealt with issues like the Hyde St [keg] party,'' Mr Cull said.
One of the trigger points for the new and improved situation was discussion over the idea of introducing a North Dunedin liquor ban.
''The proposal to put in a liquor ban turned out to be a really positive process - even though we didn't proceed with it - because it opened up a lot of dialogue and a lot of collective effort,'' Mr Cull said.
The university's response to some of the bad behaviour in the 2000s had also eased some of the tension.
''The university made it very clear that the reputation and the appeal of the university to out-of-town students was very much affected by the behaviour of the students that are here,'' Mr Cull said.
The better links between the city, students and tertiary institutions had resulted in some new initiatives, including the council signing memorandums of understanding with both the OUSA and Otago Polytechnic Students' Association.
Most people in the city were happy the students chose to come to Dunedin, largely because of the economic benefit they brought to the city, Mr Cull said.
''The other is simply the brightening up of the place with so many young people. Dunedin wouldn't be anything like the place it is without the influx of bright intelligent young people.''
OUSA president Ruby Sycamore-Smith said a key thing that had changed was it was now much ''easier to get in touch'' with the council.
Students felt like they had more of a say, which was also helped by having members on the university council, Ms Sycamore-Smith said.
''It's important that student opinions are being heard and they are not being shunted away,'' she said.
Students were also more engaged with the community through volunteering and the OUSA also ran a number events - such as gigs during O-Week and the Dunedin Craft Beer and Food Festival - which members of the public were invited to.
Otago University director of student services David Richardson said the situation began to improve about 12 or 13 years ago - ''about the time when we had the problem with the Undie 500''.
''The then mayor Peter Chin was very keen to [improve the situation], which led to the creation of a Dunedin North working party.''
Vice-chancellor Prof Harlene Hayne said the improvement was largely down to the relationship the university had formed with the OUSA, the two having worked more closely together since the introduction of volunteer student membership.
''The relationship between the university and OUSA is a really close one and I have been really fortunate to have a series of outstanding student experiences to work with while I have been vice-chancellor.
''They are all people who can see what an amazing change they can effect if they work with us,'' she said.
Otago Polytechnic chief executive Phil Ker said he had noticed a massive change.
''I can recall when I first came there was a lot of hand-wringing about North Dunedin and how dirty it was and the wild student parties and it seemed like it was almost nightly couch burning,'' Mr Ker said.
The situation had improved to a point where the city by and large saw students as an ''asset''.