Gabon opposition leader Jean Ping was on Saturday prevented by the security forces from taking a flight to France over a judicial matter, he told AFP.
"I was supposed to travel this evening but the security forces prevented me," the former African Union chief told AFP.
A career diplomat, the 75-year-old was narrowly defeated by incumbent Ali Bongo in last year's presidential election last year in what he claims was electoral fraud.
Ping told AFP he had not been notified of any ban on leaving the country, but said it appeared to be linked to a judicial request that he help with an inquiry in which he has been called as a witness.
An official-looking letter banning him from leaving the country on grounds he needed to be available to the judge leading an inquiry into a protester arrested in September, was widely circulated on social media but AFP was unable to verify its authenticity.
"The courts are on strike," he said, referring to an ongoing strike by magistrates since mid-December. "How could they issue such a document so quickly?"
But government spokesman Alain-Claude Bilie by Nze said Ping was aware of the ban.
"He is very cheeky! It's him who was trying to pull off a disappearing act when he should be be answering for his acts in court," he told AFP.
Traffic was snarled up due to the heavy deployment of security forces at Libreville airport where around 50 of Ping's supporters had also gathered, among them opposition figures such as former oil minister Alexandre Barro Chambrier.
Shortly before midnight, when the plane was due to take off, Ping returned home.
A similar ban was put in place in September after what the government accused Ping of making "inflammatory comments" but was lifted about a week later.
Gabon's parliament on Wednesday approved a raft of changes to the constitution which was slammed by the opposition as a power grab, with the proposal now set to be approved by the constitutional court.
Where the previous version said the president would rule "in consultation with the government", the new text allows him to "determine the policy of the nation" while also ruling out any limit on the number of times he can be re-elected.