How did cloud get the buster sword?

It was given to him by Zack, before he died, at the end of FFVII: Crisis Core.