Photograph: Tara Fisher
Heat all but 1 tablespoon of the oil in a 22cm nonstick frying pan. Add the onions, season with salt and fry gently for 20 minutes, stirring regularly, until soft, caramelised and golden.
Peel and halve the potatoes, then finely slice them. Add the potatoes to the onions and fry for 30 minutes over a low heat, stirring, until they are completely cooked. Remove any excess oil with a spoon and season.
Tip the potatoes and onions into a bowl and, while still warm, pour in the beaten eggs and give everything a stir.
Wash and dry the pan and then heat the remaining tablespoon of oil in it. Pour in the tortilla mixture, stir for 1 minute, then smooth the surface and let the tortilla fry gently for at least 10 minutes until a brown crust has formed underneath.
Next, take a flat lid or large plate and place it over the pan. Clamp the pan and lid together and carefully turn both over together so that the tortilla is now on the lid. Then slide the tortilla back into the pan and return the pan to the heat. It can be a bit scary to begin with, but practice makes perfect and it's very easy to get the hang of the technique. Cook the tortilla for a further 5 minutes or so until the egg is set.
Let the tortilla cool to room temperature before serving. Ideally, leave it for a day before cutting it into squares or wedges.
Get ahead: make the tortilla up to a day ahead and store in the fridge overnight covered with clingfilm.
Kitchen secret: the secret to a good tortilla is making sure the onions are caramelised and meltingly soft before you add the egg mixture.