JAKARTA, Indonesia (AP) — Indonesian President Joko Widodo said in an interview Friday that he will push ahead with sweeping and potentially unpopular economic reforms, including a more business-friendly labor law, in his final term because he is no longer constrained by politics.

Widodo also told The Associated Press it is "entirely possible" that he could ban the hard-line Islamic Defenders Front during his second five-year term — a sign of his government's deep concern about groups that are threatening Indonesia's reputation for successfully combining Islam and democracy.

The president, popularly known as "Jokowi," wants Indonesia to be known as a moderate nation, but that message has been undermined by a wave of hostility toward gay and transgender people, public canings in Aceh province which practices Shariah law under a special autonomy deal, and other examples of religious intolerance. It's a trend that could spook foreign investors courted by Widodo as key drivers of economic growth in a nation where nearly half the population is younger than 30.

In a wide-ranging interview, Widodo outlined his priorities for his second term, including continuing large-scale infrastructure projects and simplifying a cumbersome bureaucracy. He said labor laws will be overhauled in what will be a politically challenging decision to attract more investment and create more jobs.

"In the next five years I have no political burden so in making a decision, especially important decisions for the country, in my opinion it will be easier," he said during a tour of Jakarta, including a stop at a mosque in a working-class neighborhood where he performed Friday prayers.

"Things that were impossible before, I will make a lot of decisions on that in the next five years," said Widodo, 58, who was reelected with a modestly increased majority in April. Indonesia has nearly 270 million people and nearly 90% are Muslims.

Widodo presents himself as a man of the people, often emphasizing his humble roots in a riverside slum in the central Java city of Solo. His popular appeal, including his pioneering use of social media, helped him win elections for mayor of Solo, governor of Jakarta and twice for president over the past 14 years.

Now, as he enters his second term, he has close to 23 million followers in Instagram and 11 million on Twitter, numbers he is well aware of.

On Friday, Widodo's political acumen was on display during a visit to Tanah Tinggi, a working-class neighborhood of Jakarta and one of his strongholds in the sprawling and haphazardly developed capital that has 30 million people in its greater metropolitan area. He performed Muslim prayers at a local mosque, sitting cross-legged on the carpet alongside other worshippers.

Neighborhood residents crowded outside the mosque, hoping for a chance to take a selfie with the president. The stench from open sewage running through roadside ditches wafted through the air.

Widodo's frequent public outings, in which he is typically thronged by enthusiastic crowds, appear spontaneous, but contain carefully crafted political messages. In Tanah Tinggi, he wore a simple white shirt and locally made $30 sneakers, in line with his humble image and in sharp contrast to the entitlement and corruption often associated with Indonesian politicians.

The public prayer also helped shore up his image as a devout man. During the bitterly contested general election, his opponent, former special forces general Prabowo Subianto, was supported by Muslim groups who favor Shariah law and which criticized Widodo for supposedly not being observant enough.

Bowing to political reality, Widodo chose a cleric as his running mate, which helped secure the backing of Indonesia's largest mainstream Muslim group. He won 55.5% of the vote but the results showed a deeply polarized electorate, with religiously conservative provinces voting heavily in favor of Subianto.

Widodo said he would try to work with Islamist groups as long as their views don't violate Indonesia's founding principles that include a secular government and tolerance of several officially recognized religions. "If an organization endangers the nation in its ideology I won't compromise," he said.

Asked about possibly banning the Islamic Defenders Front, he said: "Yes, of course, it's entirely possible if the government review from a security and ideological standpoint shows that they are not in line with the nation."

The front was once on the political fringes in Indonesia, but has gained significant influence through humanitarian and charity work. It wants Shariah law to apply to Indonesia's 230 million Muslims. It was a key player in organizing massive street protests in 2016 and 2017 against the governor of Jakarta, a Widodo ally, who was subsequently imprisoned for blasphemy.

Widodo in 2017 banned Hizbut Tahrir Indonesia, a smaller group than the Islamic Defenders Front that campaigned for a global caliphate.

As Widodo waded into the crowd after prayers at the mosque in Tanah Tinggi, he posed for dozens of selfies, one of his trademark moves, clearly relishing the adoration. He's become so adept at the selfie routine that he frequently took the cellphone from excited supporters and snapped the photo for the sake of speed.

His security detail — men with crew cuts, colorful batik shirts and black pants — seemed relaxed despite the unpredictable nature of the walkabouts.

As Widodo slowly drove away in a black SUV, he rolled down the window and handed school notebooks to people lining the street. The notebooks carried inspirational messages such as "Come and study, study, study," and were signed with his nickname Jokowi.

Asked about perceptions President Donald Trump has fostered a poisonous anti-Muslim atmosphere with his tweets and policies, Widodo called for all leaders to refrain from discriminating on the basis of religion, race or ethnicity.

But he said he would welcome a Trump visit to Indonesia.

"It will be the government's pleasure to invite Trump to visit Indonesia and I think the Indonesian people would also welcome if President Trump visited Indonesia," he said.

A part of Widodo's popularity has stemmed from his family not taking advantage of his political office for financial gain. That is a relative novelty for Indonesia which during the authoritarian era of President Suharto was accustomed to his family members enriching themselves at the public's expense.

"I've always taught my kids to be self-sufficient and be responsible and never be involved in state-related projects. I've forbid them since I was the governor till now I'm the president," Widodo said. "My kids are already happy selling martabak (a dessert), banana fritters and coffee."

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.