While visiting Buenos Aires, President Obama said the United States will offer any assistance necessary to probe the Islamic State attacks in Brussels that killed at least 31 people and wounded some 270 others. (Reuters)

President Obama declared Wednesday that defeating the terrorist threat posed by the Islamic State remains his top priority, but he forcefully dismissed calls to alter his strategy and vowed not to change course “simply because it’s political season.”

At a news conference here, Obama responded to criticism from Republican presidential candidates who, in the wake of the terrorist bombings in Brussels that killed 31 people Tuesday, have said the president has not done enough to combat terrorist organizations. The Islamic State has asserted responsibility for the attacks.

“As our strategy evolves and we see additional opportunities, we will go after it,” Obama told reporters after a meeting with Argentine President Mauricio Macri. “But what we don’t do, and what we should not do, is take approaches that are going to be counterproductive. So when I hear somebody saying we should carpet-bomb Iraq or Syria, not only is that inhumane, not only is that contrary to our values, but that would likely be an extraordinary mechanism for ISIL to recruit more people willing to die and explode bombs in an airport or in a metro station. That’s not a smart strategy.”

Tuesday’s gruesome attacks, which injured 270 at Brussels Airport and a downtown subway station, refocused attention on the president’s strategy in the international fight against terrorism. Obama, on a week-long trip to Cuba and Argentina, reacted to the bombings during appearances in both countries. But he did not alter his schedule — that would validate the terrorists’ goal of injecting fear and disruption into people’s routines, he said.

As he has after past terrorist attacks — including those last year in Paris and San Bernardino, Calif. — Obama insisted that his approach to battling the Islamic State in Iraq and Syria is showing slow, steady gains, and he cautioned against an overreaction to the attacks in Brussels.

The administration has focused on U.S.-led airstrikes against Islamic State targets, U.S. assistance for Iraqi troops and Syrian opposition forces, and disruptions of terrorist financial networks, while deploying a small number of U.S. Special Forces soldiers in Syria.

Referring to Sen. Ted Cruz (R-Tex.), a presidential hopeful who called Tuesday for law enforcement to “patrol and secure Muslim neighborhoods,” Obama ­noted that Cruz’s father fled to the United States from Cuba, where the Castro regime employed such tactics.

“I just left a country that engages in that kind of neighborhood surveillance — which, by the way, the father of Senator Cruz escaped for America, the land of the free,” Obama said of his historic visit to Havana. “The notion that we would start down that slippery slope makes absolutely no sense. It’s contrary to who we are. And it’s not going to help us defeat ISIL.” The Islamic State is also known as ISIL and ISIS.

The president emphasized that the fight against the terrorists is complicated by the challenge of trying to identify “very small groups of people who are willing to die themselves and can walk into a crowd and detonate a bomb.”

And he said the U.S. government does not “just go ahead and blow something up just so that we can go back home and say we blew something up. That’s not a foreign policy. That’s not a military strategy.”

The president’s visit was aimed at highlighting Argentina’s more U.S.-friendly government and its potential to play a greater role in hemispheric affairs.

What we know about the connections between the Brussels and Paris attacks

Obama arrived Wednesday morning at the Casa Rosada — an ornate, dusky rose building that has served as the office of the Argentine president since the 1860s — to a reception featuring a military band and guards in elaborate dress. He and Macri, along with their top advisers, met to discuss issues including foreign investment and regional stability.

Macri’s Nov. 22 election represents an opportunity to improve U.S.-Argentina relations that had deteriorated under his predecessor, Cristina Fernández de Kirchner. But Macri won the election with just over 51 percent of the vote, reflecting an electorate that remains divided between those seeking a more centrist approach to governing and those backing leftist, more-confrontational positions.

As a result, analysts said, Macri aims to govern in ways that may be more closely aligned with U.S. interests, but he will not do much to appear explicitly aligned with the Obama administration.

In the joint news conference, Macri described the meeting as “the beginning of a new phase of mature, intelligent and constructive relations” between the countries.

On Wednesday night, the president and Michelle Obama attended a state dinner hosted by Macri, where Obama accepted a female dancer’s invitation to tango. They were soon joined on the floor by the first lady and a male dancer.

Some Argentines protested Obama’s visit, including in front of the U.S. Embassy, while others complained about the traffic it caused. But others welcomed the visit. One of them, a 25-year-old janitor named Ivan Jarra, watched as Obama’s limousine approached the Casa Rosada.

“I think that Obama’s visit is great,” said Jarra, who voted for Macri. “I think it’s necessary for Argentina, in terms of trade especially, to have a better economy. . . . Any alliance with a developed country will be useful for us, but with the United States especially.”

But the strikes in Brussels linked to the Islamic State may have detracted from Obama’s overall message here.

Obama was criticized by Republicans for his reaction to the terrorist attacks in Paris that killed 130 people in November, after which he traveled to Asia and warned against fear-mongering from his GOP rivals and the ­media.

Although he again insisted Wednesday that the Islamic State is not an “existential threat” to the United States — “They can’t destroy us. They can’t defeat us. They don’t produce anything,” he said — Obama was mindful in Buenos Aires to express empathy with Americans who have become fearful.

“Our hearts bleed because we know that could be our children. That could be our family members or our friends, or our co-workers who travel to a place like Brussels,” the president said. “And it scares the American people. And it horrifies me. I’ve got two young daughters who are growing up a little too fast, and I want them to have the freedom to move and to travel around the world without the possibility that they’d be killed.

“I understand why this is the top priority of the American people,” he continued. “And I want them to understand this is my top priority as well.”

But he cautioned against what he described as counterproductive, political reaction. “We’re going to be steady. We’re going to be resolute. And ultimately we’re going to be successful,” he said.

And he defended his decision not to alter his itinerary in reaction to the terrorist attacks.

“It is very important for us to not respond with fear,” he said. “But we defeat them in part by saying: ‘You are not strong. You are weak.’ ”

Nakamura reported from Washington. Irene Caselli in Buenos Aires contributed to this report.

Read more:

Today's coverage from Post correspondents around the world