An Islamist attack on a cafe in Dhaka, capital of Bangladesh, in early July - and the subsequent siege - ended with 20 people, mostly foreigners, dead. How has this affected the mood in Bangladesh, one of the world's poorest countries?

Dhaka looks the same: crowded, noisy, chaotic traffic but vibrant and energetic. Tens of thousands of rickshaws, which are the backbone of Dhaka's transport, crisscross the city with their passengers.

Thousands of women wearing colourful attire walk in and out of hundreds of garments factories dotted in and around the city. People greet me with their customary ''Assalamualaikum" (Peace be upon you). Yes, this was how Dhaka looked when I came here a few years ago.

But beneath the calm, there is undeniable tension. People are on the edge. New security checkpoints have sprung up near key locations. There are random police raids in several residential areas. University students are viewed with suspicion. Parents are keen to know what their sons and daughters are doing on social media and who they interact with.

Violence in the country has been escalating over the past three years. More than 40 people - mostly liberal bloggers, activists, academics and members of religious minorities - have died in targeted killings. The Islamic State group and Al Qaeda in South Asia have said they carried out these attacks.

The jihadist attacks on a cafe in a supposedly heavily protected district in Dhaka, and the violence outside the country's largest congregation for Eid prayers earlier this month, seem to have changed the country forever.

Some of the Islamists were educated in the country's elite schools and universities. The usual suspects were students of madrassas or Muslim religious schools. People I spoke to say the jihadists have won the first round - by triggering panic and insecurity.

Image copyright Getty Images Image caption Bangladesh's Rapid Action Battalion was deployed after the Holey Artisan Bakery cafe attack

Yet the Awami League government appears to be confident. It says it has the situation under control and is tracking those young Bangladeshis who might have been radicalised and could be planning further attacks.

''We know who they are, and we are keeping a careful watch on them. I can assure you that, although this tragedy can hit any country or city, as we have seen, we have utmost determination to prevent it from happening ever again,'' Dr Gowher Rizvi, a senior advisor to the prime minister, told me.

Despite these reassuring words, I could feel that things have definitely changed on the ground. As soon as I reached Dhaka, my colleagues and friends warned me not to travel by foot. ''Take your car, even if you want to travel short distances," they said. "Dhaka is not safe.''

I knew the situation was getting worse but not this bad. I lived and worked in this beautiful country for nearly three years. As a fellow South Asian, I was easily able to mingle with the local population. Now, several hotels and buildings have armed protection. Vehicles are scrutinised, bags are screened and visitors are body-searched.

Gulshan is the diplomatic district in Dhaka. In addition to housing most of the expatriates, foreigners and embassies, it also has some of the best multi-cuisine restaurants, clubs and cafes. It's where the Holey Artisan Bakery is located.

I used to meet all my friends and contacts in different restaurants. A few days ago, I went to several restaurants to see how they were getting on after the cafe attack. Most of them had only a handful of clients, and some of them were even empty.

Image copyright AP Image caption Bangladesh garment factory workers. There are fears that further attacks could seriously damage the industry

Dhaka is a city of clubs and restaurants. If these clubs and restaurants are not full, then what will people do in the evenings? "Our business is down by 80%. Our clients, both foreign and locals, are scared to come to the restaurants," a cafe owner told me.

The country's garments industry is the worst hit. Bangladesh is the second-largest exporter of ready-made garments, and the industry employs four million people, most of them women. The country last year exported clothes worth about $28bn (£21bn) of clothes, mostly to Europe and the United States.

Following the attack, several foreign buyers have left the country. Many international retail brands have cancelled visits by their representatives to Bangladesh. Those who have decided to remain have been asked to stay at home and urged to take extreme caution.

I was told that a European brand had pulled out 12 of its 15 staff members, with the remaining three to be relocated to India. No doubt, there is fear among foreigners. Factory owners are hopeful that there is no immediate impact on commerce, but things can change in the long-term.

"If there is one more attack, that's it. We will have to shut shop. There is no alternative. I don't think the Bangladeshi garments industry will be able to withstand any further attacks, especially on expatriates," said Ms Rubana Haq, managing director of Mohammadi Group.

Image copyright Getty Images Image caption Twenty people, most of them foreigners, died in the attack

During my meetings with people from a cross-section of society, one point came across quite strongly. Now, there is suspicion even among students.

"This incident shows that we hardly know each other. We make sure that we know the people with whom we are walking every day. Not just meeting them, not just knowing their names, but actually knowing them," a Dhaka University student said.

For the first time, I could feel that people here are scared, depressed and they sound helpless. Bangladesh has faced a number of natural disasters and violent military coups in its history, but the people of this country have always bounced back from those adversities.

They are well-known for their resilience. But now they are worried and uncertain about the invisible enemy. They don't know what direction this Muslim-majority country is taking. They don't know who to trust and what will happen next.

One businessman told me: "It's not about the setbacks we are facing, it is about how we respond to these setbacks that is the most important thing. That will define our future."