This year, for the first time since Ronald Reagan assailed the Soviet Union in 1980, an American presidential candidate actively campaigned against another country’s national interests. By threatening to deport all undocumented immigrants, about half of whom are Mexican; to build a wall on the Mexican border; and to rip up the North American Free Trade Agreement, which is far more important for Mexico than for the United States, Donald J. Trump made Mexico one of the central issues of the campaign.

How should Mexicans respond now that Mr. Trump has been elected?

President Enrique Peña Nieto has opted for a nonconfrontational approach. Since his embarrassing invitation to and welcome of Mr. Trump in August, he has repeatedly tried to accommodate Mr. Trump’s demands. He has accepted reopening discussion of Nafta and he has limited debate about “the wall” to who will pay for it — not whether it should be built. Mr. Peña Nieto has said he will help the Mexicans whom Mr. Trump says his administration will deport, but he has not taken a firm stand against the deportations themselves.

Mexico doesn’t have to appease Mr. Trump like this. It can fight back. It will not win every battle, but it may achieve more through obstruction, and making life miserable for the new president by increasing the cost of his anti-Mexican policies, than it will achieve by appeasement.

On Nafta, Mexico should simply tell Washington that it refuses to renegotiate the treaty. There may be reasons to create side agreements to supplement the treaty and to address issues like currency devaluation or wages. But the idea of renegotiating Nafta, as Mr. Trump says he intends to do, should be completely unacceptable to the government of Mexico.