How did Mexico earn the holiday Cinco de Mayo?

When they earned fredom from Spain.