Lockie Ferguson unleashed a blistering spell of fast bowling, claiming a hat-trick to power New Zealand to a nail-biting five-run victory over Sri Lanka in the second T20 at Dambulla on Sunday.