The bodies of nine Italians killed by Islamist militants who stormed an upmarket restaurant in the Bangladeshi capital last week were brought to Rome in a military plane on Tuesday.

Most of the 20 victims of the attack, which started late on Friday night, were foreigners — from Japan, India and the United States as well as Italy.

Italian President Sergio Mattarella cut short a visit to Latin America after the attack and returned to Rome, where he waited for the arrival of the plane with Foreign Minister Paolo Gentiloni.

Nine coffins, draped in the Italian flag, were lowered from the plane and white-robed priests sprinkled them with Catholic holy water as the victims' families looked on.

The Holey Artisan restaurant in Dhaka where the attack took place is popular with foreigners, and investigators in Rome are looking into whether Italians were specifically targeted, a judicial source said.

Autopsies will be carried out on the Italian victims.