Finely mince the prepared guajillo chiles.
Put the oil in a medium saucepan or deep skillet over medium-high heat.
When the oil is hot, add the minced chiles, chopped onions, and garlic.
Cook, stirring occasionally, until the onions have softened, about 5 minutes.
Add the chopped tomatoes with their liquid, the sugar, a generous pinch of salt, and plenty of freshly ground black pepper.
Stir everything to combine.
Adjust the heat so the mixture bubbles gently.
Cook, stirring occasionally, for about 20 minutes, or until the salsa has thickened and the flavors have melded together.
Remove the pan from the heat and stir in the chopped cilantro and fresh lime juice.
Taste the salsa and adjust the seasoning as needed with more salt or pepper.
Serve hot or at room temperature.
Don't discard the chile soaking water! It's full of flavor and can be used to thin the salsa if it becomes too thick or as a base for other recipes like Tortilla Soup.