In a large heatproof casserole dish, heat the olive oil over a medium-high heat and sear the chicken legs until golden all over. Remove and drain to one side on a plate lined with kitchen paper. Add the onion to the dish and fry for 4-5 minutes, stirring occasionally. Add the chopped pepper and ham and cook for a further 2-3 minutes.
Deglaze the pan with the sherry, stirring the base and sides well to dissolve any residue. Add the chicken legs back to the dish along with the tomato and olives and cover with the chicken stock. Bring to the boil, then reduce to a simmer.
Cover the dish and lower to a simmer, cooking the chicken gently for 25-35 minutes until cooked and tender. Cut into a thick chunk of chicken and check that it is cooked through, with no pink showing. Adjust the seasoning once the chicken is cooked, then spoon into serving bowls.
For top tips on protecting you and your family when preparing raw meat and poultry, visit Food Safety in the Home.