Short or loose connection.The starter might need to be cleaned.Take it apart after you have gone through all the connections.The ground on the motor could be loose.J
I had the same prob and found the bolt holding the starter together had broke inside and causing the armature to be off center and rub , shorting out.Took it apart cleaned the brushes etc ,Put another bolt in and runs fine now