Sorry, I am on the second floor.
The actual igniting may be due to a spark. What I saw and heard was almost certainly gas ignitng. So, electricity alone is not the explanation. Also, usually when you have bad wiring and sparks you get the smell of ozone. I haven’t smelled any in my apartment.