The council spent months getting the deal over the line.