HANNOVER, Germany — President Obama on Monday announced the deployment of up to 250 U.S. military personnel to Syria, mostly special operations forces, to assist local troops trying to dislodge Islamic State extremists. He called the move essential to keeping up momentum against the group.

The deployment will bring the number of personnel to roughly 300, up from about 50 special operations forces now in Syria.

Obama revealed his decision a week after Defense Secretary Ash Carter announced that more than 200 U.S. troops soon will be headed to Iraq, where local forces are also battling Islamic State militants who control areas of that country. He said none of the new forces heading to Syria would participate in direct combat.

“They’re not going to be leading the fight on the ground, but they will be essential in providing the training and assisting local forces,” Obama said in Germany, capping a weeklong trip that also took him to Saudi Arabia and Great Britain.

The Islamic State was a focus of private talks with his counterparts in all three stops.

Senior U.S. officials have been touting the success of the existing U.S. forces in Syria, including their effectiveness in assisting local forces and generating critical intelligence that helps the U.S.-led coalition target Islamic State insurgents.

“We want to accelerate that progress,” said Ben Rhodes, Obama’s deputy national security adviser.

Obama said U.S.-European collaboration must extend to the threat posed by the Islamic State. As he announced deeper U.S. involvement, he urged Europe to step up, too.

Before returning to Washington, Obama huddled with the leaders of Great Britain, Germany, France and Italy. He said ahead of the meeting that he planned to ask those nations to step up their training and airstrike contributions to the campaign against the Islamic State and to provide more economic aid to rebuild parts of Iraq recaptured from the Islamic State.

“Europe and NATO can still do more,” he said. “We need to do everything in our power to stop them.”

Obama discussed his troop decision briefly during a broader speech on U.S.-European relations and the importance to the world of continued European unity. Obama urged Europe’s leaders to pay attention to income inequality, which he said creates wedges among populations, and other issues including education for young people and equal pay for women.

“If we do not solve these problems, we start seeing those who would try to exploit these fears and frustrations and channel them in a destructive way,” Obama said. He decried an “us-versus-them” mentality that breeds animosity toward immigrants, Muslims and others.

“This is a defining moment and what happens on this continent has consequences for people around the globe,” Obama said. “If a unified, peaceful, liberal, pluralistic, free-market Europe begins to doubt itself, begins to question the progress that’s been made over the last several decades, then we can’t expect the progress that is just now taking hold in many places around the world will continue.”

His appeal for Europe to stick together came days after he made a forceful argument while in London against Great Britain exiting the European Union.