A court in Nigeria has ordered that popular comedian Baba Suwe - detained on suspicion of drug trafficking - be released on bail by Friday.
The actor and comedian was arrested on 12 October after a body scanner at Lagos airport identified suspected drugs in his stomach, officials said.
His lawyer argued that his continued detention was unlawful.
Fans and other actors gathered outside the High Court in Lagos to show solidarity with the Nigerian comedian.
The BBC's Tomi Oladipo in Lagos says Baba Suwe, whose real name is Babatunde Omidina, looked distressed during his court appearance - the first since his arrest.
He is due to be released on Friday - when a previous court order allowing Nigeria's National Drug Law Enforcement Agency (NDLEA) to keep him in their custody expires, our reporter says.
Baba Suwe has not been formally charged and the judge set his bail at $3,300 (£2,000), our correspondent says.
'No drugs excreted'
Baba Suwe was arrested as he was about to board a flight to Paris after a body scanner identified suspected drugs in his stomach, NDLEA spokesman Ofoyeju Mitchell said at the time.
The NDLEA suspected that Mr Suwe had ingested drugs and the agency was waiting for him to excrete them.
But the NDLEA has admitted that he has not yet excreted any drugs since his arrest nearly three weeks ago, our reporter says.
Baba Suwe's lawyer, Bamidele Aturu, said the court's ruling was a victory for justice.
However, Mr Aturu said he wanted to draw attention to the fact that many Nigerians are detained for lengthy periods without being charged and their cases are never highlighted.
Baba Suwe is a famous comedian in Nigeria's film industry, known as Nollywood, and his arrest shocked many of his fans, says our correspondent.
He acts in both English and Yoruba language films, often playing the role of a befuddled butler or security guard.