Peel and chop the onion. Wash the thyme, shake dry and pluck off the leaves, except for a little to garnish. Heat the oil in a pot and fry the onions. Add sugar and thyme, heat for about 1 minute while stirring and add tomatoes, ketchup, vinegar, a little salt and chilli.
Coarsely mash the tomatoes in the pot, bring to the boil and simmer at low heat for about 5 minutes. Season the sauce with salt, let it cool down and arrange it garnished with thyme.