By Gabriela Baczynska

BRUSSELS (Reuters) - The European Union on Thursday announced it was contracting 348 million euros ($393 mln) to the U.N. World Food Programme (WFP) for humanitarian aid to Syrian refugees in Turkey, part of the bloc's migration cooperation with Ankara.

The money comes as part of a 3 billion euro support for some 3 million Syrian refugees living in Turkey, which the EU promised in return for Ankara's help in curbing the number of people embarking from there for Europe.

"This is the largest humanitarian program the EU has ever financed," the bloc's Humanitarian Aid and Crisis Management Commissioner Christos Stylianides said in announcing the deal.

"The EU is keeping its promise of assisting Turkey in hosting the largest refugee population in the world."

The WFP, together with the Turkish Red Crescent, will roll out a system under which refugees would get pre-paid cards to cover for food, housing, schooling or medical expenses in Turkey, where most Syrian refugees live outside camps.

Stylianides stressed allowing refugees to choose what they buy was important in giving the distressed people a sense of dignity and could help their relations with local communities.

The Cypriot commissioner said the EU had so far contracted 652 million euros for refugees in Turkey. But Ankara complains the money flows slowly as only 181 million euros have so far been disbursed.

The EU, which relies on Ankara in the migration deal that gave leaders of the 28-nation bloc a badly-needed breathing space after mass arrivals in 2015, promised to step up the aid and is also in talks on visa liberalization for Turks.

These have stalled before the summer break and ties between the EU and Ankara soured after a failed coup in Turkey in July.

The EU has intensified criticism of Turkey's track record on human rights as Ankara went on to dismiss tens of thousands of people, and arrest many of them, over alleged links to a U.S.-based Muslim cleric whom it accuses of being behind the coup.

Both sides are now seeking to calm down the rhetoric and, in the latest of a string of high-level contacts, EU's top diplomat, Federica Mogherini, and Enlargement Commissioner Johannes Hahn will visit Ankara on Friday.

Ankara says it would go on preventing refugees and migrants setting sail for the EU but may refuse to accept returns from the bloc if it does not give it more relaxed travel rules.

($1 = 0.8853 euros)

(Editing by Ralph Boulton)