Donald Trump has laid out a US military policy that would avoid interventions in foreign conflicts and instead focus heavily on defeating Islamic State militancy.

“We will stop racing to topple foreign regimes that we know nothing about, that we shouldn’t be involved with,” the president-elect said on Tuesday night in Fayetteville, near Fort Bragg military base in North Carolina.

“Instead our focus must be on defeating terrorism and destroying Isis, and we will.”

Speaking in Tampa, Florida, Obama did not mention Trump by name – but implicitly warned his successor to dispense with overheated rhetoric in favor of a nuanced approach to the war on terror, and to avoid actions that could give false legitimacy to Isis as the “vanguard of a new world order”.

Obama told a room of service members at MacDill air force base: “Rather than offer false promises that we can eliminate terrorism by dropping more bombs or deploying more and more troops or fencing ourselves off from the rest of the world, we have to take a long view of the terrorist threat, and we have to pursue a smart strategy than can be sustained.”

During the course of his campaign, Trump vowed to “bomb the shit out of” Islamic State and routinely declined to offer a counter-terrorism strategy by claiming that doing so would reveal the country’s plans before the enemy.

He also suggested terrorists were streaming across the US border disguised as refugees, and proposed aggressive policies that included a ban on all Muslim immigration to the US.

Trump, making the latest stop on a so-called “thank you” tour of states critical to his 8 November election win, introduced his choice for defense secretary, General James Mattis, to a large crowd in Fayetteville, near the Fort Bragg military base, which has deployed soldiers to 90 countries around the world.

He vowed a strong rebuilding of the US military, which he suggested had been stretched too thin. Instead of investing in wars, he said, he would spend money to build up America’s aging roads, bridges and airports.

But he also wanted to boost spending on the military. To help pay for his buildup, Trump pledged to seek congressional approval for lifting caps on defense spending that were part of “sequestration” legislation cutting spending across the board.

“We don’t want to have a depleted military because we’re all over the place fighting in areas that we shouldn’t be fighting in. It’s not going to be depleted any longer,” he said.

Trump said any nation that shared his goals would be considered a US partner.

“We don’t forget. We want to strengthen old friendships and seek out new friendships,” he said. But the policy of “intervention and chaos” must come to an end.

While US armed forces are deployed in far-flung places around the globe, they are only involved currently in active combat in the Middle East – Iraq and Syria for the most part.

“We will build up our military not as an act of aggression, but as an act of prevention,” he said. “In short we seek peace through strength.”

Trump used similar rhetoric during the election campaign when he railed against the war in Iraq. Unusually for a Republican, Trump not only loudly expressed his dismay at George W Bush’s 2003 intervention but falsely claimed that he opposed it at the time and accused Bush of lying about the presence of weapons of mass destruction.

He told the Guardian in October 2015: “We’re nation-building. We can’t do it. We have to build our own nation. We’re nation-building, trying to tell people who have [had] dictators or worse for centuries how to run their own countries.

“Assad is bad,” Trump added of the Syrian president. “Maybe these people could be worse.”

In Fayetteville, Trump did not explicitly repeat his pledge to bar Muslims from coming to the US but maintained he would “suspend immigration from regions where it cannot be safely processed”.

He described James Mattis as the right person for the job and urged Congress to approve a waiver to let him take on the civilian position of defense secretary. Under US law a military leader must be retired for seven years before becoming eligible for the post.

Taking the microphone, Mattis said: “I look forward to being the civilian leader as long as the Congress gives me the waiver and the Senate votes to consent.”

“We’re going to get you that waiver,” Trump replied, returning to the microphone. “If you don’t get that waiver there are going to be a lot of angry people.”