Preheat the oven to 220°C (200°C fan, gas 7). Wash and peel the potatoes and cut into 3mm thick slices.
Halve the leek lengthwise, wash well, shake dry and slice.
Finely grate the cheese.
Heat the milk with the cream, salt, pepper and nutmeg in a saucepan until just boiling. Peel and crush the garlic clove and add to the pan. Add the potato slices and simmer for about 10 minutes, stirring occasionally.
Dice the ham and place in a bowl with the leek. Remove the potatoes from the pan with a slotted spoon and add to the leek and ham.
Mix together gently and spread out a buttered baking dish.
Spoon over the milk and cream mixture with a ladle.
Sprinkle with grated cheese and top with small pieces of butter. Bake in the preheated oven for 20 minutes until golden brown on top.