Issues after heater replacment

I bought a replacement heater since the old heater quit heating. Pumps ran, LED showed heater engaged but no heating. I turned off the main and emergency breakers. I drained the tub. Installed the new heater. Re-filled and checked for leaks. All OK! But now the breaker keeps tripping - sometimes immediately and sometimes after a couple of seconds. Double checked the ground wire. Pulled the filter. Still tripping. Any ideas?