Mexico City lawmakers have become the first in Latin America to legalize gay marriage.

City legislators passed the bill 39-20 on Monday with five lawmakers absent.

Gay marriage is currently allowed in only seven countries and some parts of the United States.

Leftist Mexico City Mayor Marcelo Ebrard is widely expected to sign the decision into law.

The bill calls for changing the definition of marriage in the city's civic code. Marriage is currently defined as the union of a man and a woman. The new definition will be "the free uniting of two people."