I had a starter do this on a Westerbeke diesel in my ex Navy Whaleboat. Heard the whine after starting, shut down the engine and the whining kept going. Put my hand on the starter and felt the hum. Rapped it lightly with a hammer, and it quit. Never done it again.
That's what we call "percussive maintenance".