Updated

An Indonesian court Thursday rejected a request for the extradition of an alleged people-smuggling "kingpin" to Australia, instead freeing the Afghan from detention.

The release of Sayeed Abbas is a major blow to Australia, which requested the extradition, as it tries to reduce the number of asylum seekers arriving on its territory by sea and dismantle people-smuggling networks that organise the boat journeys.

"The Afghan citizen Sayeed Abbas... cannot be extradited to Australia and we order his release from prison," chief judge Pranoto, who goes by one name, told the South Jakarta District Court, adding the extradition request "has no legal foundation".

"The crime he committed did not happen in the country that requested the extradition," Pranoto said, adding that Indonesia's 1979 extradition law did not cover the crime of people-smuggling.

Having served a 30-month jail term for breaking Indonesian immigration laws, Abbas will likely be deported to Afghanistan after being processed by immigration.

Abbas received the news with a wide smile, bringing both hands to his mouth in disbelief.

"I'm not people smuggler. I'm very happy. I'll be back to Afghanistan," Abbas told reporters in English after hearing the court's decision.

Abbas has lived in Indonesia for 11 years and is married to an Indonesian woman.

Australia has sought Abbas' extradition since 2010 over organising several boats for asylum seekers to Australia, including one in 2011 that sank of the eastern Javanese coast and killed some 200 people on board.

A court in Western Australia's Perth had issued a warrant for his arrest on 27 charges related people-smuggling to face a maximum jail term of 20 years.

Australian authorities have said they believe Abbas had continued to arrange boats for asylum seekers from his prison cell.

The issue of people smuggling is highly divisive in Australia and has dominated the agenda of several election campaigns in recent years as well as current discourse as Australians prepare to vote in September.

Asylum seekers arriving in Indonesia from countries such as Afghanistan, Sri Lanka and Myanmar pay people smugglers to get a seat on often rickety wooden vessels for the journey to Australia, but hundreds have died on the perilous voyage.