There was no doubt about it: Saif al-Islam Gaddafi, Colonel Muammar Gaddafi's second son and heir presumptive, had been captured. Mustafa Abdul Jalil, head of the rebels' National Transitional Council (NTC), declared on Monday that he was "being kept in a secure place under close guard".

"We gave instructions that he is well treated, in order to be judged," he said.

News of the supposed arrest, which came without a date or a location, was a huge boost for the rebel movement. Victory – so slow in coming over the past six months – looked finally to be within reach.

Yet just hours later, journalists at the Rixos hotel in Tripoli were woken during the night by a knock at the door and told to go downstairs. There, inside a white armoured vehicle, with a mobile phone next to him and a smile playing around his lips, was Saif himself.

He was, the BBC reported, "pumped full of adrenalin, brimming with confidence", and full of contempt for the "rats" attacking his city. "I am here to refute the lies [about his supposed arrest]," he said. Asked about the international criminal court, whose prosecutor had hours earlier confirmed his detention, he replied succinctly: "Screw the ICC."

The revelation that the man they had declared to be in captivity was in fact touring parts of regime-held Tripoli and doing the V-for-victory sign for a crowd of apparent supporters seemed to stun many rebels as much as it did the rest of the world.

Sadeq al-Kabir, a spokesman for the NTC leadership, had no explanation of Saif's sudden reappearance, and could say only: "This could all be lies."

Waheed Burshan, president of the NTC in the north-western town of Gharyan, was similarly lost for words. "We had confirmation Saif al-Islam was arrested, but we have no idea how he escaped," he told al-Jazeera.

The ICC's prosecutor, Luis Moreno-Ocampo, told journalists early on Monday the arrest had taken place. But he said on Tuesday the rebels had never, in fact, confirmed it officially.

"Different answers were given [by the NTC]. That was a little ambiguous," said a spokesman, Fadi el-Abdallah. The prosecutor's office has not yet responded for comment.

Some initial theories as to how the mix-up occured suggested cock-up rather than conspiracy, implying either that Saif had been wrongly identified or that he had managed to escape capture, just as his brother, Muhammad, reportedly did from house arrest. Burshan mentioned the "inexperienced youth" of the rebel movement, as well as the lack of a "structured military guard". One rebel, Muftah Ahmad Uthman, told Reuters: "We're trying to figure out how he escaped. You know, the capital was captured really quickly. Many of the men in uniform are volunteers, and some of them make mistakes."

Others, however, suspected a more complex backstory. Fawas Gerges, a professor of Middle Eastern politics at the London School of Economics, said he thought the entire operation could have been a "propaganda campaign" by some of the rebels designed to show the Gaddafi dynasty was being annihilated.

"I don't think he was arrested. I really don't," he said. The plan's spectacular backfiring "tells you a great deal about the incompetence of the rebels," he added. "This is worrisome." It could even, he said, do the opposite of what such a campaign would have been trying to achieve. "His reappearance will likely embolden the remnants of Gaddafi followers. There is potential for Saif to lead a rebellion," Gerges said.

Larbi Sadiki, from the University of Exeter, agreed that the rebels could well have been making a clumsy attempt at psychological warfare in order to "sow doubt and chaos in the enemy's camp".

"The idea is that news of Saif's capture or death of any of the Gaddafis is calculated to demoralise the regime's supporters, especially those putting up a fierce resistance in Tripoli to defend Gaddafi and co. Saif's cameo appearance aimed to undo this, reversing the psychology against the rebels," he said.

Both sides' strategies, he added, had "an element of a gamble" to them, but while the regime's tactics smacked of despair, the rebels' decision "results from perhaps over-confidence" and eagerness to oust Gaddafi.

Whatever the origins of the saga, the image it projects of the rebels is hardly flattering – and while Saif's dramatic reappearance is far from the only occasion on which the international community has had reason to question the credibility of the fighters, this particular misstep could prove damning.

"The rebels are not functioning as a unfied command and control," said Gerges, saying he did not believe Jalil had knowingly been complicit in any untruths. "They are acting more as desperate militia. It is a de facto government but they haven't grasped this yet."

Speaking on BBC Radio 4's Today programme, the international development secretary, Andrew Mitchell, was keen to avoid chastising the NTC leadership. "I think it's inevitable in this situation, with the warfare going on … that there will be some confusion. There's no doubt that Chairman Jalil believed that to be the case when he made those points," he said.

One man who was not sparing of the rebels, however, was Saif himself. As he rode around the few parts of Tripoli known to be still under the control of his father's crumbling regime – which he called "the hottest spots" – he accused them of waging an "electronic and media war in order to spread chaos and fear in Libya". "They sent text messages to the Libyan people through the Libyana [mobile phone] network. They stopped our broadcast transmission," he said.

With his beard, T-shirt and beaming smile, Saif looked for all the world as if he was a celebrity on holiday greeting his fans – although there were questions over how genuine the show of support for him really was. He shook hands and laughed as dozens of men in the Bab al-Aziziya compound toted their guns and held out their hands to him. Such was the bravado of the images that, exiting a meeting of the national security council, the deputy prime minister, Nick Clegg, was at pains to insist they were "not the sign of some great comeback for the Gaddafi regime".

Over the past six months, 39-year-old Saif has left far behind him the reputation he once cultivated: that of an eloquent and educated man who partied in Europe, studied for a doctorate in London and was believed by many to be the future of a more palatable Libyan government. As the conflict with the rebels deepened, he became the regime's spokesman, appearing in smart suits and ties but ditching all talk of democratisation and peace. More recently, he appeared to have moved into new territory again, sitting for an interview with the New York Times with a beard and Islamic prayer beads. Throughout the conflict, he has done nothing to shake off the idea that he is the son picked to take over from the father.

And with the regime entering what seemed to be its dying days, that impression was stronger than ever: as his son staged his comeback in the glare of the cameras, Gaddafi himself was neither seen nor heard. Asked during his tour if the Libyan leader was still in Tripoli, Saif replied: "Of course." But, as rumours swirled that Gaddafi could be hiding in his compound in the capital, no one in the international community was daring to be so definite.

Speaking to the BBC, Colonel Roland Lavoie, a Nato spokesman, said: "We don't know where Gaddafi is," adding, perhaps suprisingly, that his capture was "not necessarily a key factor." And Mitchell said that, while he had "no idea" where the dictator was, "the Americans" thought he was still in Libya. "No one is sure for certain," he added.

Similar uncertainty surrounded the fate of Muhammad Gaddafi, the leader's eldest son, who the rebels on Monday said was under house arrest but who later reportedly fled. According to Ibrahim Sahad, a military officer and rebel sympathiser who resigned from the Gaddafi regime in 1981, Muhammad, the telecommunications chief, escaped when the rebels left him with some guards.

"[The rebels] wanted to show him the civilisation of this revolution, so they left him at home and they put some guards around the house. And the information now is that he escaped. I mean, this should not be done."

In an interview with the Australian broadcaster ABC, he added: "I would like to see his sons dealt with in a more secure way … I would say that the way they dealt with Muhammad last night was not adequate."