BRUSSELS — Under pressure to help Europe control its worst refugee crisis since World War II, President Recep Tayyip Erdogan of Turkey turned the tables on European leaders on Monday and said the best way to ease the problem was for the European Union to help contain the war in Syria.

Meeting with European Union leaders as part of a state visit to Belgium, Mr. Erdogan laid claim to the moral high ground in the migration crisis, saying his country had spent nearly $8 billion managing migrants from Syria and Iraq, or several times the amounts spent by other countries to help Turkey.

“We are open to all kinds of cooperation in this area,” Mr. Erdogan said after a meeting in Brussels with Donald Tusk, the president of the European Council.