Heat the oil in a large saucepan over a medium heat. Add the onion with a pinch of salt and cook for about 10 minutes, stirring occasionally, until sweet and golden.
Add the garlic and cumin and fry for another minute, then add the lentils and water. Bring to the boil, reduce the heat to a generous simmer and cook for about 20 minutes or until the lentils are soft.
Remove from the heat and blend all the ingredients in a food processor until smooth. Return to the pan along with the spinach if using. Season with salt and pepper. If the soup is too thick add more water and adjust the seasoning.
Serve with lemon or yoghurt, together with some olives, harissa and Moroccan bread.