Mystery surrounds the circumstances of the killing of Libya's rebel military commander, Gen Abdel Fattah Younes, a day after he and two aides were shot.
Rebel leader Mustafa Abdul-Jalil said they had been killed by gunmen after Gen Younes was recalled from the front.
He said the ringleader of the attack had been held but he gave no details about his identity or the motive.
Hundreds of mourners carried a coffin containing the general's body into Benghazi's main square.
"We got the body yesterday here [in Benghazi], he had been shot and burned," Gen Younes' nephew, Abdul Hakim, said as he followed the coffin in the square.
"He had called us at 1000 (0800 GMT on Thursday) to say he was on his way here," he told Reuters news agency.
Another nephew told the crowd of mourners that they would remain loyal to Mr Jalil and the rebel cause.
"A message to Mustafa Abdul-Jalil: We will walk with you all the way," Reuters quoted Mohammed Younes as saying.
"Libya first, until God gives us victory or chooses us as martyrs."
The general - a former interior minister who had served at the heart of Col Muammar Gaddafi's regime since the 1969 coup - joined the rebels at the beginning of the Libyan uprising in February.
The BBC's Ian Pannell in the rebel-held city of Misrata says his defection was seen as a coup for the opposition, but there had been rumours that he had kept contacts with the Gaddafi leadership.
Our correspondent says the death will feed international suspicions that the rebels cannot be trusted.
Mr Jalil announced the general's death late on Thursday, and said the head of the group of men who killed him had been captured.
Mr Jalil, who heads the rebel National Transitional Council, did not say who the assailants were or where the attack took place.
He said there would be three days of mourning in their honour.
It has not been disclosed where the attack took place; nor where the bodies were found.
Gen Younes was due to appear before a panel of judges in Benghazi.
The exact nature of the questions he was facing is also unclear. Mr Jalil said they regarded military operations.
Some unconfirmed reports said Gen Younes and two aides had been arrested earlier on Thursday near Libya's eastern front.
Shortly after the announcement of their death, gunmen entered the grounds of the hotel in the eastern city of Benghazi where Mr Jalil was speaking, reportedly firing into the air before being convinced to leave.
Divisions in Benghazi
Earlier on Thursday, rebels said they had seized the strategically important town of Ghazaya near the Tunisian border, after heavy fighting with Col Gaddafi's forces.
They reportedly took control of several other towns or villages in the area.
The rebels are struggling to break a military deadlock five months into the uprising against Col Gaddafi's rule.
Rebels control most of eastern Libya from their base in Benghazi and the western port city of Misrata, while Col Gaddafi retains much of the west, including the capital, Tripoli.
Late on Thursday AFP news agency reported explosions shaking the centre of Tripoli, as state TV reported that planes were flying over the Libyan capital.
Nato, acting under a UN mandate authorising military action for the protection of civilians, has carried out regular air strikes in the Tripoli area.
South Africa's ambassador to the UN on Thursday warned that supporters of the rebels were in danger of violating UN sanctions and criticised calls by Western governments for Col Gaddafi to stand down.
The BBC's Barbara Plett at the UN says the growing trend to grant diplomatic recognition to the Libyan rebels is facing opposition on the Security Council.
About 30 countries have recognised the NTC.