The terror attack  in central Jakarta Thursday will only intensify Indonesia’s long struggle to attract foreign direct investment. At the very least, it will be another factor for President Joko Widodo to explain away as he courts the capital that has helped other Southeast Asian nations grow far faster.

The sprawling nation of 250 million people has been no slouch in attracting foreign direct investment — the sort of money that goes into brick-and-mortar projects, not stocks and bonds — in recent years. In absolute terms, that investment has doubled in four years, rising from $15 billion in 2010 to $30 billion in 2014.

The caveat is that FDI as a percentage of the additions to Indonesia’s stock of factories, bridges and plant equipment is about a quarter of what it is in other Southeast Asian nations, according to the United Nations Conference on Trade and Development. Put another way, Indonesia gets something out of foreign investors, but not nearly as much as other countries in the region.

The country can do better, the managing director of the International Monetary Fund, Christine Lagarde, said in a recent speech in Jakarta. Lagarde said the country needs to remove constraints that shackle its private sector.

“On the investment side, this means streamlining complex regulatory requirements,” she said. “It also means harmonizing overlapping and contradictory national and local regulations.”

It’s a message that Widodo, who was elected in 2014 on a reformist platform, has taken to heart. His government is reforming restrictive rules on purchasing land, and trying to create “one-stop shopping” for foreign investors who complain of having to hack through a thicket of licensing regulations.

In early 2015, the country’s authorities revealed they had canceled assorted permits for $23 billion in foreign investment between 2007 and 2012.

Last year, Widodo took his pitch — in English — to a business-minded crowd at a World Economic Forum meeting. "Please come and invest in Indonesia. Because where we see challenges, I see opportunity," he said. "And if you have any problem, call me."

If terrorism is Indonesia’s emerging problem with foreign investors, nationalism might be the problem they remember most. In 2013, DBS, a Singapore-based financial services group, abandoned a $7.2 billion purchase of Indonesia’s Bank Danamon after the central bank slapped a 40 percent cap on foreign ownership of banks.

That’s only the tip of the iceberg. Through a complex list maintained by the government, Indonesia restricts foreign investment sector by sector, giving Widodo a long row to hoe.

“Generally, the response about the new policies is positive, but the market had not witnessed any significant movement yet,” Anton Sitorus, head of research and consultancy for Indonesia at real estate service company Savills, told the Wall Street Journal.

After the United States, Japan and 10 other Pacific Rim countries clinched a free-trade deal in October, the Trans-Pacific Partnership, former Trade Minister Gita Wirjawan gave a frank assessment of Indonesia’s fitness for membership: not very.

Productive capacity per worker in Indonesia is half of what it is in Malaysia, a TPP member. Wirjawan exhorted the government to smooth the way for more foreign investment, which would raise efficiency through better infrastructure and modern technology.

“We're not as competitive as our colleagues in Malaysia and Singapore,” he said. “We should build the infrastructure, build the quality of our education first."