Heat 4 tablespoons of oil in a casserole, fry the onions until translucent. Briefly sauté the crushed garlic. Cut the tomatoes into small pieces. Add tomatoes, tomato paste, sherry, chilli pepper (whole) to the onions. Stir and simmer uncovered for 15 minutes until a thick paste has formed. Spice up.
In the meantime, cut the potatoes into small cubes and fry them in the remaining olive oil for approx. 5 minutes. Fry for another 15 minutes over a very low heat, turning carefully several times. Put the potatoes in the sauce and briefly heat up again.