1Puree tomatoes with juice in a blender until smooth. Cook onion and garlic in oil with 1/4 tsp salt in a 4 qt heavy saucepan over medium heat, stirring occasionally,until golden, about 8 minutes.
2Add spices and 1/2 tsp pepper and cook,stirring frequently, 1 minute. Add tomato puree,tomato paste,brown sugar and vinegar and simmer,uncovered,stirring occasionally until very thick, 45 to 55 minutes (stir more frequently toward end of cooking to prevent scorching)
3Puree ketchup in blender until smooth (use caution when blending hot liquids) Chill at least 2 hours (for flavors to develop).