The complex threat of the ISIS extremist group will not be ultimately defeated by guns but through ideology, Barack Obama says.

The U.S. president made the remarks Monday on the military campaign against the Islamic State group after being briefed by Pentagon officials earlier in the day. 

He called for co-operation among countries in a fight he said spills over borders. Obama will look to partner with Muslim communities that he said are often the target of ISIS attacks.

"The battle for hearts and minds is going to be a generational struggle," he said.

Obama has insisted he will not send U.S. troops into ground combat to fight the Islamic State in Iraq or Syria. However, he has acknowledged that the U.S. lacks a "complete strategy" for training Iraqi troops to carry out ground missions. He identified local authorities in targeted communities as essential to any kind of resolution.

"If [the U.S. military tries] to do everything ourselves, we'll be playing whack-a-mole," Obama said.

Republicans accused of obstructing

The president's meetings with top Pentagon officials and other national security advisers follow a wave of weekend airstrikes by the U.S.-led coalition in eastern Syria. The coalition says it was one of the most sustained aerial operations carried out in Syria to date. Obama noted that the total number of airstrikes during the deployment has surpassed 5,000.

Efforts to train Syrian rebels are also sputtering. Fewer than 100 rebels are being trained by the U.S., far fewer than the goal of producing 5,400 fighters a year.

Obama acknowledged that the nationless ISIS group has been using technology to solicit Islamists around the world, some of whom end up launching attacks abroad, without military backing. He said the U.S. will continue to examine "what's working and what [the U.S.] can do better."

"The threat of lone wolves is complex. The small cells are becoming harder to detect," Obama said.

Ahead of the president's meetings, the White House sharply criticized U.S. Senate Republicans for failing to confirm Adam Szubin, Obama's nominee to be the Treasury undersecretary responsible for choking off funding to groups like ISIS.

White House spokesman Josh Earnest said Republicans had refused to "even give him the time of day for a hearing" since Obama nominated Szubin in April, adding that the Senate should confirm him before legislators go home for their annual August recess.

"It's time for Republicans in the Senate to do their jobs for a change," Earnest said.

Obama said that Szubin's appointment would significantly contribute to improved foreign affairs.

With files from The Associated Press