Mexico's Senate has voted to ratify a new free trade agreement with the United States and Canada, making it the first of the three countries to gain legislative approval.

Mexico's upper chamber voted 114 to four with three abstentions on Wednesday in favor of the U.S.-Mexico-Canada Agreement.

U.S. President Donald Trump had demanded a renegotiation of the North American Free Trade Agreement that it would replace.

Earlier this month, on the same day the Mexico's executive formally presented the agreement to the Senate, Trump announced via Twitter that he would begin imposing escalating tariffs on all Mexican imports unless Mexico slowed the flow of Central American migrants to their shared border.

The treaty is still awaiting consideration by lawmakers in the United States and Canada.