Evoking history and appealing for solidarity, President Barack Obama on Monday cast his decision to send 250 more troops to Syria as a bid to keep up "momentum" in the campaign to dislodge Islamic State extremists. He pressed European allies to match the U.S. with new contributions of their own.

Obama's announcement of the American troops, which capped a six-day tour to the Middle East and Europe, reflected a steady deepening of U.S. military engagement, despite the president's professed reluctance to dive further into another Middle East conflict. As Obama gave notice of the move, he said he wanted the U.S. to share the increasing burden.

Obama discussed the IS fight with British Prime Minster David Cameron, German Chancellor Angela Merkel, French President Francois Hollande and Italian Prime Minster Matteo Renzi.

The president formally announced the new troop deployment in a speech about European unity and trans-Atlantic cooperation -- a running theme of his trip. Speaking in Germany, he evoked the continent's history of banding together to defeat prejudice and emerge from the "ruins of the Second World War."

"Make no mistake," Obama said. "These terrorists will learn the same lessons as others before them have, which is, your hatred is no match for our nations united in the defense of our way of life."

The rhetoric belied an underlying frustration in his administration about allies' contributions to the U.S.-led fight in Syria and neighboring Iraq. Although the coalition includes some 66 nations, the U.S. has conducted the vast majority of the air strikes, and there has been little appetite by other nations to send in ground troops of their own.

The president recently rattled leaders in Europe and the Middle East by describing allies as "free riders." He made a passing reference to that complaint on Monday, as he noted that not all European allies contribute their expected share to NATO: "I'll be honest: Sometimes Europe has been complacent about its own defense."

On stops in Riyadh, London and Hannover this week, Obama repeatedly pushed allies for more firepower, training for local forces and economic aid to help reconstruct regions in Iraq that have been retaken from Islamic State control but are still vulnerable. Obama appeared to come up short in Riyadh, when he met with Arab allies.

He made the pitch again in Hannover, where he attended a massive industrial technology trade show on what was likely his last presidential visit to Germany.

"These terrorists are doing everything in their power to strike our cities and kill our citizens, so we need to do everything in our power to stop them," Obama said.

The new deployment brings the number of U.S. military personnel in Syria from roughly 50 to roughly 300. It follows a similar ramp-up in Iraq, announced last week. The new Syria forces will include special operation troops assisting local forces, as well as maintenance and logistics personnel.

Obama, in an interview with CBS News, declined to say whether the forces might be dispatched on search-and-kill missions.

He did say, "As a general rule, the rule is not to engage directly with the enemy but rather to work with local forces."

Obama's call for European solidarity extended beyond the anti-Islamic State campaign.

Amid what he described as "unsettling times," Obama revived the argument he made in London days earlier that Britain and the European Union are strongest if Briton votes in an upcoming referendum to remain in the 28-member nation block. And Obama mounted a forceful defense of his host in Germany, Chancellor Angela Merkel, who is facing criticism for her willingness to take in refugees from Syria.

"Chancellor Merkel and others have eloquently reminded us that we cannot turn our backs on our fellow human beings who are here now and need our help now," Obama said. "We have to uphold our values, not just when it's easy but when it's hard."

The migrant crisis was a central focus as Obama met with European leaders just before returning to Washington. Merkel said the leaders had discussed ways to expand military efforts to stop human smuggling across the Mediterranean from Libya.

"With the NATO mission in the Aegean, the United States of America have shown their readiness to take part in the fight against illegal migration," Merkel said. A senior U.S. official said the U.S. was indeed ready to help with that effort but had no new mission to announce.

Obama, who used one of his final foreign trips to start trying to shape his legacy, said he saw Europe facing a "defining moment." He urged the continent's leaders to pay attention to income inequality, 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.