The mechanism of the Hammick reaction