Before Tamim Ahmed Chowdhury orchestrated Bangladesh's worst militant attack, he sought and won approval for it from Islamic State, reports Reuters on Thursday.
A Canadian of Bangladeshi origin, he was told by his contact in the militant group, Abu Terek Mohammad Tajuddin Kausar, to target foreigners, according to a senior police official who has seen communications between the two men.
Chowdhury, located in Bangladesh at the time, proposed an attack on a Dhaka eatery frequented by expatriates.
On July 01, a group of gunmen stormed the Holey Artisan café in the city's Gulshan neighborhood, murdering 22 people, most of them foreigners, in an overnight siege that shocked the country.
The back-and-forth between Chowdhury, 30, and Kausar, 35, which includes drafts of articles later published in Islamic State magazines, has not been previously reported.
Together with attempts by people linked to Islamic State to recruit and fund militancy in the country, the documents show the extremist organisation has built deeper connections with Bangladeshi militants than was previously known.
The police official declined to be named due to the sensitivity of the information. Reuters could not independently verify the contents of the communications.
As Islamic State comes under pressure in its home base of Syria and Iraq, its activities in outposts such as Bangladesh could intensify, experts have said.
The extent of Islamic State's influence in Bangladesh will be key to the country's garment sector that employs millions of people and earns $28 billion a year in exports.
In the year before the cafe atrocity, a string of grisly individual murders, including of bloggers and foreigners, had already raised the alarm for overseas investors.
In its Rumiyah magazine published after the café massacre, Islamic State claimed two dozen attacks in the country since September 2015. The claim could not be independently verified.
After the siege, police raided suspected jihadi hideouts and said they killed dozens of militants and arrested hundreds more.
Still, the government of Prime Minister Sheikh Hasina has said Islamic State does not exist in the impoverished South Asian nation of 160 million people, and instead blames the rise in political violence on the Islamist opposition.