Republican Sen. Rob Portman told CNBC on Tuesday that President Donald Trump should not follow through on his threat to impose tariffs on Mexico.

Trump threatened last week to put a 5% tariff on all Mexican imports, effective next Monday, unless Mexico took further steps to curb illegal immigration into the United States.

Portman said the president should keep the trade pressure and focus on China, not Mexico.

"I totally share his (Trump's) frustration," the Ohio senator said of the flow of people coming into the U.S. from the Mexican border.

However, tariffs on Mexico could put in doubt ratification of the newly agreed USMCA trade accord, which also includes Canada, Portman said on "Squawk Box."

"I think he's endangering it," he said.

Portman, who served as U.S. trade representative during George W. Bush's administration, said Trump does not need to force Mexico's hand because experts would say that Mexico has been doing more than it has ever done to curb migrants from illegally entering the U.S.

"This again distracts us from where we'd like the focus to be ... to force China to play by the rules," Portman said.

Talks between Beijing and Washington stalled in early May, and each side has ramped up threats over the past month.

Trump last month announced a 25% tariff on $250 billion of Chinese goods and has threatened to place an additional duty on the remaining $300 billion of imports from China that haven't been hit with duties. China raised tariffs on billions of dollars worth of U.S. goods as a retaliatory measure and has threatened to cut the U.S. off from its supply of rare earth minerals that are used in numerous tech products.