Madagascar's ousted president was on Saturday barred by officials in his homeland from returning from exile in South Africa, but the politician told reporters at Johannesburg's airport that he would keep trying to return.

Marc Ravalomanana said aviation authorities in Madagascar had written to South African Airways to say he was not welcome. Ravalomanana had been booked on the carrier's regular Saturday flight to Antananarivo, Madagascar's capital.

"I'm very, very upset," Ravalomanana told reporters shortly after South African Airways said he could not board the plane. "I'm very disappointed right now because many Malagasy people are at the airport right now waiting for my arrival. But I'm still here — I'm stuck here."

Police fired tear gas in an attempt to disperse thousands of people who had gathered for Ravalomanana's return.

The democratically elected Ravalomanana has been in exile in South Africa since being ousted in a 2009 military-backed takeover led by Andry Rajoelina, a former disc jockey turned Antananarivo mayor. Rajoelina has been shunned by the international community and has so far rejected attempts by South Africa and other neighbors to mediate a solution that would restore democracy. Rajoelina has refused to allow Ravalomanana to return.

In a letter to South African Airways, Madagascar civil aviation authorities said Ravalomanana and his crew were "non grata persons" in Madagascar.

"So to preserve public order, don't take them on board," said Ratsirahonana Wilfrid Mamonjisoa, the acting director general of the Madagascar civil aviation authority.

By not getting on the plane Saturday, Ravalomanana avoided a possible showdown at the airport in Antananarivo. He faces arrest in Madagascar after a court set up by Rajoelina convicted him last year of conspiracy to commit murder, charges linked to the unrest surrounding his ouster. The court sentenced Ravalomanana to life with hard labor.

Ravalomanana, as he was leaving the airport, said he would find a way to return to his country.

"I'm going back in my home in South Africa, and we will see," he said.

He said in a press conference Saturday that his staff were working on "every alternative means" to get him back to Madagascar.

"There can be no solution to the crisis in Madagascar which does not involve me," he said.

In Antananarivo, thousands of Ravalomanana supporters headed toward the airport in small groups on Saturday. Security forces kept the crowds from reaching the airport, and later fired tear gas in an attempt to disperse them.

Mozambican President Joaquim Chissano, a mediator in the Madagascar conflict, issued a statement Friday that said Ravalomanana agreed to mediators' conditions that he not return until the situation in Madagascar was politically stable.

According to the agreement, Ravalomanana can return to Madagascar when conditions are safe and conducive to his return, his spokesman Olivier Andrianarisoa said.

"But who is going to determine when conditions are safe?" he said.

After Ravalomanana told reporters in Johannesburg earlier this week that he was returning, South Africa, the region's main power broker, cautioned him against taking "unilateral measures." Speaking to reporters this week, South African foreign minister Maite Nkoana-Mashabane acknowledged coup leader Rajoelina has ignored mediation efforts so far, but said negotiations are continuing.

"There are discussions about keeping the de facto President Rajoelina as an interim leader as we build up to returning the country to democratic order," Nkoana-Mashabane said.

The South African government was not consulted about Ravalomanana's intended return to Madagascar, said Clayson Monyela, spokesman for South Africa's foreign affairs department.


Associated Press Writer Lova Soarabary in Antananarivo, Madagascar, contributed to this report.