Police in Jakarta say they have foiled a plot by extremists to detonate a bomb today at the presidential palace.

Counter-terrorism police raided a house in the east Jakarta suburb of Bekasi and found a pressure cooker packed with three kilograms of high explosives.

They cleared the area and detonated the bomb at the scene.

Officers from the counter-terror squad Densus 88 arrested four people, including a woman who police say intended to detonate the bomb at a changing of the guard ceremony today at the palace.

The ceremony outside the palace gates is popular with tourists and locals.

Tight security at the palace would have stopped the woman from entering the grounds but there would have been little stopping her from detonating the device among the crowd watching the ceremony.

Police say the bomb would have had a blast radius of 300 metres.

Links to Syria-based Indonesian extremist

This is the closest extremists have come to a terror attack in Indonesia's capital since January's bomb and gun assault at a Starbucks cafe and police post that killed four innocent people.

A police spokesman said officers were tailing the woman in Bekasi when she went to a local post office with a box containing her clothes as well as a suicide note.

Police tailed her and two men back to the Bekasi house and arrested them.

Another man connected to the plot was arrested in the city of Solo.

Police have linked the attackers to the Syria-based Indonesian extremist Bahrun Naim, who has been trying to inspire an attack in Indonesia for over a year.

Most of the attacks linked to Naim have failed, such as an assault on a police post in Solo in which the attacker blew himself up and injured a police officer.

Authorities in Indonesia have disrupted numerous plots this year against police and the Government.

The hardliners responsible for the plots are unhappy with the Government's crackdown on extremists.

The nation's most infamous terrorist, Santoso, was killed by police in a Sulawesi jungle in July after a long manhunt.

Last month a three-year-old girl was killed by an extremist who threw a Molotov cocktail into the grounds of a church in East Kalimantan.

Three other children were badly burned in the attack.