The Captain Cook Tavern has played an important part in university life for most of its more than 150 years and with the pub closing its doors tonight, Otago Daily Times reporter Vaughan Elder takes a look over its, at times, raucous history.

The pub, most commonly known simply as ''the Cook'', will shut its doors tonight and, with the owners of the building yet to find someone to take over the lease, it is possible the historic student watering hole will remain closed for good.

The final call for last drinks tonight will come after a long history of serving both University of Otago staff and students, which started when the university moved to North Dunedin in 1878 - 18 years after the pub was founded.

The pub's changing face over the years has seen it at as a place for intellectual discussion, with James K. Baxter among its patrons in the 1960s, a key venue in the rise of the Dunedin Sound in the 1980s and as a party destination for students in the 1990s and 2000s.

Richard McLeod, one of the owners of Cook Brothers Bars, which has run the pub since 2004, said some patrons pushed the limits and he had countless stories of students taking it too far.

''One of the more interesting ones was a guy who got refused [from entering] and he went round the back into the car park and tried to jump the fence and ended up falling into a 40-gallon drum of oil which had come out of the deep fryer. That was pretty messy and pretty disgusting as well.''

Running the bar also proved stressful at times.

''One of the most stressful moments of my time at the Cook was when the university had objected to the renewal of our licence and we were having a hearing because of Cookathon.

''The university proceeded to show a video of five guys arriving at Cookathon dressed as ninja turtles jumping on an old lady's Holden Barina at the red lights at Great King St.

"That was fairly stressful, to say the least, and it still makes my heart go up a few beats when I think about it.''

If the Cook did close for good, it would leave a gap in North Dunedin, he said.

''With the Gardies now a study centre and, potentially, the Cook having its doors shut, that uniqueness that North Dunedin had just won't quite be the same.''

Otago University Students' Association president Francisco Hernandez said ''having a jug at the Cook'' was a ''rite of passage'' for students and it would be sad to see the pub go.

''Whether it was the days when you would hit up the upstairs Cook in first year before going to Tui's and going back to the hall, or just going to see the rugby on a Saturday because Sky was too expensive for the flat and jugs were cheap.

"It's been a stepping stone that has, in its own way, helped the reputation of the university,'' Mr Hernandez said.

The closure of the Cook, which follows the closure of other historic student pubs the Gardens Tavern and the Bowler, would not make Dunedin a less attractive place to study, he said.

''Dunedin still has the best campus lifestyle of any university. Otago students are relatable and friendly. It's the people that make Otago, not the pubs.''

Dunedin historian and columnist Peter Entwisle, who was a regular at the Cook in the 1960s, said the pub had been the main ''student watering hole'' since the University of Otago moved to North Dunedin in 1878. He believed the Cook was the longest-serving student pub in New Zealand.

''My first acquaintance with it would be from the early 1960s, about 1962. By that time it was already well-known as a student watering hole and it had been for a long time.''

Mr Entwisle had fond memories of taking part in ''somewhat drunken intellectual discussions'' at the pub throughout the 1960s.

''You could meet really interesting people in there and have really interesting conversations; you could meet James K. Baxter in there in the late 1960s and have a chat with him.

"It had a real kind of value that set it apart from other pubs.''

Until the 1970s, it was not uncommon for some of the younger lecturers or tutors to reconvene tutorials at the pub.

''They would all just be sitting around the table having serious discussions about course-related stuff [over a beer].''

At that time there was also a section of the pub frequented by non-students or ''the locals'' and a hotel upstairs, which housed ''a few old alcoholics'', but students represented the bulk of its customers.

The main part of the building, which still stands today, was constructed in 1873 and was designed by architect David Ross, who also designed the Dunedin Club.

The publican in the days Mr Entwisle went to the bar was former boxer Phil Ruston, who was ''very student-friendly'' and known to lend students money on occasion.

''I can remember hilarious things that happened in the days of six o'clock closing because there was a cop shop just across the street.''

At the time, Dunedin was known for its illegal ''after hours scene'' and on one occasion Mr Ruston hurried all the customers into what was then the bar's yard just before a police raid.

''Anyway, the bar emptied out on to the yard and the cops raided and they couldn't see anyone in the bar, so they went to the yard and there were 100 people holding their jugs looking up at the sky.''

All the customers ''got done'' by police, but Mr Ruston was nice enough to pay everyone's fines.

Mr Entwisle said the bar changed after television screens were installed and it became more difficult to have a conversation.

''I would still go there occasionally ... into the 1980s. But it was no longer an environment to have a drink and a semi-serious conversation.''

It would be sad to see the bar go, but Mr Entwisle believed there was a future for it if someone ''recreated'' the old days, when it was a place where university staff and students went for a beer and a chat.

Otago University head of music and Verlaines frontman Dr Graeme Downes said the Cook, during the 1980s, served as an important venue for the burgeoning Dunedin Sound, with most of the big bands of the era, including his band, the Chills, the Stonesand the Sneaky Feelings all playing there

"Around about 1982 was when the so-called Dunedin sound bands started playing there.

"They all cut their teeth at the Empire initially, but the music became so popular the Empire wasn't really big enough any more.''

This meant they shifted to the Cook or the Oriental, which had room for bigger crowds.

''It was vitally important, these bands started and many by their own admission - me included - weren't particularly good at playing.

"We were pretty raw early on, but the fact that there were so many opportunities to play, everyone just got exponentially better over that period ... and went on to play and record some fairly monumental music,'' Dr Downes said.

He had fond memories of both seeing bands at the Cook and playing there, despite it being a bit of a cramped venue.

''It was not the most comfortable to play in, because the ceiling is very low ... it was pretty hot and sweaty with a big crowd in, but that was kind of fun in its own way, too.''

''It was a very low stage, so the audience was right up against you and you couldn't see the bands if you were right down the back.''

The first band he saw at the Cook, despite being underage at the time, was Toy Love in 1979.

James Arnott, one of the owners of Cook Brothers Bars, which sub-leases the building from DB Breweries and owns the Captain Cook Tavern trademark, said the main reason behind the pub's demise was a rapid change in drinking culture among students over the past five years.

''The drinking culture changed completely. Students are drinking less regularly and when they are drinking, they are drinking at home and they are buying alcohol from supermarkets,'' Mr Arnott said.

This and a rising prevalence of both legal and illegal highs meant that when people did come to the pub, they often were not buying drinks. This change in culture had resulted in a ''huge drop in turnover'' along with the closure of other historic Dunedin pubs.

''There ... [used to be] four or five big grunty student pubs like the Cook, the Gardies and the Bowler and Two Bears and they have all gone,'' he said.

Given the drastically changed environment, he was not surprised the building's owners were yet to find someone to take over the lease.

However, he still hoped someone would step in to save the pub and Cook Brothers Bars would be happy to pass on the Captain Cook Tavern trademark to someone interested in taking it on.

Otago University students Tom Lancashire and Sam Cole, who were the only patrons in the pub when the Otago Daily Times visited on Monday afternoon, said they would be sad to see the pub go.

The drinking culture and the ''good times'' people had at places like the Cook were one the things which attracted him to study at Dunedin, Mr Cole said.

''I think everyone is pretty gutted that it is closing down. Everyone that I know would always have a good thing to say about their experiences at the Cook.''

Despite the Cook's closure, he was confident the Hyde St keg party and the flatting scene on Castle St would keep Dunedin's scarfie culture alive.

Despite it being the middle of the exam period, the pair were celebrating some unexpectedly good marks with a few jugs.

Key dates

1860: The Captain Cook Tavern was established.

1873: The building, which still stands today, was constructed.

1878: The University of Otago moves to North Dunedin.

1967: Closing times for on-licences are extended from 6pm to 10pm.

1980s: The pub serves as an important venue for Dunedin Sound bands.

Early 2000s: The infamous Cookathon begins.

2009: Cookathons no longer held after Liquor Licensing Authority decision.

2009 and 2010: The Bowling Green Tavern closes in 2009, with the Gardens Tavern closing the following year. Both have been converted to academic facilities by the University of Otago.