A suicide bomber blew himself up at a police station in Indonesia on Wednesday, killing himself and wounding six others, according to authorities who described the 24-year-old attacker as a "lone wolf".

The motive for the attack was not immediately known, but police stations have been frequent targets for radicals in the world's biggest Muslim majority nation, which has long struggled with Islamist militancy.

The blast happened around 8:45 am local time (0145 GMT) at the police compound in Medan on Sumatra island during morning roll call.

"For now, we believe he was a lone wolf," national police spokesman Dedi Prasetyo told reporters in Jakarta.

"The anti-terror squad and forensics unit are still examining the crime scene," he added.

At least six people were wounded in the blast, including four officers and two civilians, but their injuries were not severe, he added.

The attacker -- whose identification listed him as a student -- wore an explosive device on his body, but Prasetyo did not say what kind of bomb was used.

A bloody corpse lying in the compound's parking lot appeared to have been blown apart.

Indonesian police at their headquarters in Medan after the suspected suicide attack
Indonesian police at their headquarters in Medan after the suspected suicide attack AFP / ATAR

Police said the attacker was active on social media, while CCTV footage showed him entering the compound wearing a uniform worn by drivers of a popular ride-hailing service.

The attack came a day after Indonesia launched a website that lets the public report "radical" content posted by government workers, including material that promotes hate or intolerance.

The Southeast Asian nation of some 260 million has significant numbers of religious minorities -- including Christians, Hindus and Buddhists -- who have been targeted by radical Islamist groups amid concerns about rising intolerance.

Police stations have also been a frequent target of militants, some of whom have called for the pluralist country to become a strict Islamic state.

In August, authorities shot and arrested a militant who attacked officers at a station in Indonesia's second-biggest city, Surabaya, while in June another was seriously wounded when he tried to blow himself up outside a police building on Java island.

Last month, Indonesian President Joko Widodo ordered beefed-up security after two militants from an Islamic State-linked terror group stabbed his chief security minister.

He survived the attack, which led to the arrests of dozens of terror suspects.

The attackers were identified as members of Jamaah Ansharut Daulah (JAD), an extremist network loyal to IS and responsible for several previous attacks -- including deadly suicide bombings at several churches in Surabaya last year.