This article is from the Final-Fantasy and other Square Soft Games FAQ, by email@example.com (Nick Zitzmann) with numerous contributions by others.
What you just witnessed was a "near-fatal" move, or a "limit break" as
it would be called in future Final Fantasies. When a character is low on
HP, there is a very small chance that they will do one of these. Each
character only does one move, and those moves are as follows:
Terra: Riot Blade
Edgar: Royal Shock*
Sabin: Tiger Break
Shadow: Shadow Fang
Cyan: Black Blade
Celes: Spin Edge
Setzer: Red Card
Mog: Moogle Rush
Relm: Star Prism
Secret Character #2: X-Meteo
Note that Gau and Secret Character #1 don't have near-fatal moves,
because they don't have "Fight" battle commands.
* = It's Royal _Shock_, not Royal _Shook_!