A bus service linking which was previously under threat has been saved.