The results of 3D numerical simulations modelling the twisting of a coronal loop due to photospheric vortex motions are presented. The simulations are carried out using an initial purely axial field and an initial equilibrium configuration with twist, Phi = L Btheta / r Bz < Phicrit. The non-linear and resistive evolutions of the instability are followed. The magnetic field is twisted by the boundary motions into a loop which initially has boundary layers near the photospheric boundaries as has been suggested by previous work. The boundary motions increase the twist in the loop until it becomes unstable. For both cases the boundary twisting triggers the kink instability. In both cases a helical current structure wraps itself around the kinked central current. This current scales linearly with grid resolution indicating current sheet formation. For the cases studied 35-40% of the free magnetic energy is released. This is sufficient to explain the energy released in a compact loop flare.