Mexico City legalizes same-sex marriage!

Mexico City has voted to legalize same-sex marriage. Wow, I wasn’t expecting this. I Mexico City was more liberal that the rest of the country, but I thought the stuff like marriage law was under federal jurisdiction. I didn’t realize it was a state/federal district thing in Mexico like it is the US. Interestingly the response from the Mexican anti-gay movement is exactly the same as the response to DC legalizing same-sex marriage; go the courts and try to push for a referendum. Can the Mexican Congress overide the local authorities like the US Congress can do to DC?