You have something dead shorted somewhere.....OR you have the starter electrically engaged. Either would provide a substantial spark....but didn't you say the starter engaged when you connected the battery? That tells me you have the starter engaged "somehow" whether through a starter defect, or by operator error. lol Happens to the best of us.