I caught mine in a timer ball on emerald (my very first one in an ultra ball on ruby), I got its HP down to the red, threw a few ultra balls and then started throwing timer balls (a master ball on sapphire because I was SRing for a shiny one)
Rayquaza? Man... For me, that was a long time ago... 999:59+ game hours ago, I think...
My Emerald said that it was in a Timer Ball...
I had a Master Ball, but I didn't want to use it on Rayquaza. I had to save it for Latios, who is a bigger pain in the arse to catch (And the Latios I caught became one of my most loyal Battle Frontier partners, but that is another story).
Ok, so I think I had a good set of Pokemon with me... Wait! I think I had Groudon and Kyogre with me back then! I think I had them in my party. I'm sorry. That battle was 999:59+ game hours ago... But I'm pretty sure that I had them.
Anyway, I made sure that I bought plenty of Ultra Balls and Timer Balls.
And as I've mentioned above, I was able to contain it in a Timer Ball.