(CNN) Mexico's president on Saturday said he's open to negotiating with the United States after President Donald Trump threatened to slap tariffs on all Mexican imports over immigration.

"I believe we will be able to reach an agreement, because reason is with us," Mexican President Andrés Manuel López Obrador said at a news conference in Veracruz, insisting that Mexico wants to maintain a good relationship with the United States.

López Obrador said Mexico is not interested in a tariff war, but slammed Trump's tariff proposal as unfair.

"In these moments we have national unity. That all, regardless of our political or ideological differences, of our conviction, of our religions, we defend Mexico. Because our country does not deserve that treatment," López Obrador told reporters.

Trump announced Thursday that he would impose tariffs of 5% on all imports from Mexico to the US, gradually increasing to 25% in October if Mexico's government doesn't do more to stop illegal border crossings.

Read More