Rights activist Hassanna Aalia, 26, is demanding political asylum in Spain but says Spanish authorities have turned down his request. He told AFP he faces torture in jail in Morocco.
Aalia was one of the organisers of a protest camp that drew tens of thousands of Sahrawis in 2010 in Western Sahara, a former Spanish colony now controlled by Morocco.
He was accused of killing members of the Moroccan security forces during unrest that broke out when they raided the camp and crushed the protest.
Eleven security force agents and two Sahrawi civilians died in the clashes.
Aalia denied any wrongdoing but said he was sentenced to life in prison in absentia by a Moroccan military court in 2013, while he was studying in Spain. He had earlier received a suspended sentence from a civilian court.
"If I go back there, I face jail for life and all kinds of torture and mistreatment," he told AFP.
An interior ministry spokeswoman told AFP the ministry could not comment on the case due to confidentiality laws governing asylum cases.
Aalia said his lawyer was preparing to lodge a last-minute appeal against his deportation at Spain's National Court. It was not certain whether he could be deported before the appeal runs its course.
He alleged Spain was refusing him asylum to protect its economic relations with Morocco.
"This is a political case. Economic interests are being placed above all else," he said.
Aalia's supporters staged a five-day hunger strike in Madrid airport which ended on Wednesday.
They then handed to the interior ministry a petition demanding asylum for Aalia, signed by 150 groups including branches of the left-wing party Podemos and the leading trade union UGT.
Morocco took control of most of Western Sahara in November 1975 when Spain withdrew. Repeated bids by UN mediators to hold a referendum on self-determination for the Sahrawis have failed.
The Spanish Human Rights Association warned Spain it was breaching international human rights treaties by denying Aalia asylum.
"The expulsion order could be a death sentence to this person," it said. It accused Morocco of "repression" in the territory.