WASHINGTON — President Trump pushed ahead with plans to impose tariffs on Mexico over the objections of several top advisers, including his son-in-law, Jared Kushner, opting to side with hard-line officials who were advocating the move, according to multiple administration officials and people briefed on their plans.

For several weeks, Mr. Trump’s top economic advisers have been urging the president not to use tariffs to punish Mexico for failing to stop the flow of migrants into the United States. Mr. Kushner, along with Steven Mnuchin, the Treasury secretary, and Robert Lighthizer, Mr. Trump’s top trade negotiator, has warned the move would imperil the president’s other priorities, like passage of a revised North American trade agreement with Canada and Mexico.

But in recent weeks, Mr. Trump, whose anger toward Mexico had steadily grown, suggested the idea of using tariffs, and the issue had been raised in a number of meetings on trade or immigration, these people said, speaking on the condition of anonymity to discuss private conversations.

His frustration had been building since January, when Democrats refused to fund his wall along the southwestern border. In March, Mr. Trump moved to cut off all foreign aid to Guatemala, Honduras and El Salvador and then threatened to close the border entirely, before being talked down by advisers who said the disruption in the flow of goods and people could have severe consequences for the economy.