The former president of the Maldives took refuge for a second day Thursday in the country's Indian embassy, and his party spokesman said he would not leave the building until the current leader resigns.

Abdul Gafoor, spokesman for the Maldivian Democratic Party, said former President Mohamed Nasheed was in danger and the party had urged him to remain in the embassy in the capital, Male.

"The threat level is high. The party is advising him not to step outside," Gafoor told The Associated Press.

Nasheed entered the embassy Wednesday after a court ordered his arrest for not attending a hearing on charges that he illegally ordered the detention of a senior judge, a move which led to his ouster from power last year. Nasheed says that the charges are politically motivated to disqualify him from running for the presidency in September elections.

The government says the arrest warrant expired Wednesday night but Gafoor said the party feared for Nasheed's life.

Nasheed demanded in a statement Wednesday that President Mohammed Waheed Hassan resign and install a caretaker government to oversee the election. He said Hassan could not be trusted to hold a free and fair vote.

The Indian government says it has not decided whether to give Nasheed asylum. Foreign ministry spokesman Syed Akbaruddin said the government will take it "a day at a time."

However, the Indian government issued a statement Wednesday saying that candidates from all political parties must be free to participate in the election.

"Prevention of participation by political leaders in the contest would call into question the integrity of the electoral process, thereby perpetuating the current political instability in the Maldives," it said.

In response, the Maldives Foreign Ministry said "it is unfortunate that the government of India has decided to publicly comment on today's events instead of opting for bilateral discussions between the two governments."

Nasheed became Maldives' first democratically elected president in 2008 after 30 years of autocratic rule. He resigned last year after weeks of public protests over the judge's arrest and after losing the support of the military and police. His deputy Hassan took over as president.

An inquiry commission dismissed Nasheed's claim that he was ousted in a coup.