Mr Cocks staved off challenges from fellow councillors Cath Gilmour, of Queenstown, and Calum MacLeod, of Wanaka.
Mayor Vanessa van Uden announced her decision late yesterday afternoon saying the appointment maintained a ''balance of representation'' in the district between Queenstown and Wanaka.
Speaking to the Otago Daily Times, Ms van Uden said she had always been very clear the job would go to the best person and she considered Mr Cocks had done ''a very good job'' in the past three years.
''From a continuity point of view and from a district-wide perspective, it is my experience that Lyal is able to take a wider view as well as advocating for the local guys.''
Mr Cocks said he found the role ''very satisfying''.
''I enjoy being the back-up for the mayor on ceremonial occasions, I have a good knowledge of the whole district, I have built up a good working relationship with all councillors and I am very keen to continue.''
Ms van Uden recognised that Mr MacLeod was the highest-polling Wanaka candidate in last Saturday's election.
''That is part of the consideration but for me it was about the best person for the job.''
She said Mr MacLeod would be given opportunities to ''develop and get to know the ropes''.
Asked if it counted against Ms Gilmour that she was from Queenstown, Ms van Uden said: ''To a certain degree.
''I do think it is a good thing that if you have got a good candidate in Wanaka that means you have sort of got that balance across the district.''
Ms Gilmour said she was disappointed but Mr Cocks had been ''an excellent deputy mayor'' in the past term.
''Politically it had to be a Wanaka person, so that's the way it is.''
Mr MacLeod could not be contacted for comment last night.