BRUSSELS, Sept 15 (Reuters) - Some 23,000 irregular migrants arrived in Italy in August, the European Union's border agency said on Thursday, most crossing the Mediterranean on what has become the main immigration route into Europe.

The vast majority of the 117,900 people who arrived in Italy this year came by boat from Libya. The Frontex agency said the numbers were similar to those in 2015.

Rescuers pulled some 650 migrants to safety and recovered five dead bodies from boats in difficulty off the coast of Libya on Wednesday, Italy's coastguard said.

Greece was the main point of entry for refugees and migrants in 2015, when some 1.3 million people reached the European Union, triggering bitter and unresolved disputes in the bloc over how to handle the influx.

Since Turkey agreed to prevent people from setting sail for Greece from its shores, the numbers taking that route have fallen dramatically. Frontex said some 3,430 people reached Greek islands from Turkey last month, only about three percent of the number in August, 2015.

"However, August also saw a first noticeable monthly increase since the EU-Turkey statement came into effect," Frontex said. "In July, the number of detections stood at 2,030."

Those taking the Greek route tend to be from Syria, Pakistan, Afghanistan or Iraq, while the Italian route is dominated by Nigerians, Eritreans and Bangladeshis, Frontex said.

The EU is working with African countries to step up returns and has said it will make aid conditional on keeping a lid on migration to Europe.

(Reporting by Gabriela Baczynska; editing by Andrew Roche) ((; +32 2 287 68 39; Reuters Messaging: