Soak the gammon in plenty of cold water in the fridge for at least two hours, or overnight. Drain well.
Place the gammon along with all the other gammon ingredients in a casserole dish. The liquid should cover the meat; if not, add a little water to just cover. Bring to the boil, then reduce the heat to low and simmer gently, partly covered with a lid, for 1¼ hours. Turn the gammon carefully in the liquid every 20 minutes or so.
Preheat the oven to 200C/400F/Gas 6.
Remove the gammon from its cooking stock, transfer to a small roasting tin. Reserve the cooking liquid for making the sauce.
Cut the rind from the gammon, leaving a thin layer of fat, and discard the rind. With a small sharp knife, score the fat into diamonds.
For the glaze, put a ladleful of cooking liquid into a large clean pan. Add the sugar and chilli powder and cook until a glaze-like consistency. Pour this over the gammon and roast for 15 minutes, until browned and caramelised.