BENGHAZI, Libya – The Libyan rebels’ military commander was killed by his comrades while in custody after he was arrested by the opposition’s leadership on suspicion of treason, witnesses said Friday, in a sign of disarray that posed a major setback for the movement battling Moammar Gadhafi.

The slaying of Abdel-Fattah Younis raised fear and uncertainty in Benghazi, the de facto rebel capital. Thousands marched behind his coffin, wrapped in the rebels’ tricolor flag, to the graveyard for his burial, chanting that he was a martyr “beloved by God.” Troops fired a military salute as the coffin arrived, and angry and grieving supporters fired wildly into the air with automatic weapons.

At the graveside, Younis’ son, Ashraf, broke down, crying and screaming as they lowered the body into the ground and — in a startling and risky display in a city that was the first to shed Gadhafi’s rule nearly six months ago – pleaded hysterically for the return of the Libyan leader to bring stability.

“We want Moammar to come back! We want the green flag back!” he shouted at the crowd, referring to Gadhafi’s national banner.

Younis’ slaying appeared to shake both the rebels’ leadership body, the National Transitional Council, and its Western allies, who have heavily backed the rebels controlling most of eastern Libya.

Two weeks ago, 32 nations including the U.S. made a major commitment by formally recognizing the opposition as the country’s legitimate government — a significant boost after many allies hesitated in part because the rebels, a mix of tribes and factions, were largely an unknown quantity.

Those Western worries will likely be deepened if Younis’ slaying opens major splits among the fractious rebels. Divisions would also weaken the opposition’s campaign to oust Gadhafi, which has largely stalled in a deadlock despite the four-month-old NATO bombing campaign against regime forces.

In Washington, State Department spokesman Mark Toner said the circumstances of Younis’ death remained unclear, but he pressed the opposition to shore up any cracks in their front against Gadhafi.

Younis’ body was found Thursday, dumped outside Benghazi, along with the bodies of two colonels who were his top aides. They had been shot and their bodies burned.

Younis was Gadhafi’s interior minister until he defected to the rebellion early in the uprising, which began in February, bringing his forces into the opposition ranks.

His move raised hopes among rebels and Western allies that the uprising could succeed in forcing out the country’s ruler of more than four decades. But some rebels remained deeply suspicious that he retained loyalties to Gadhafi.

The National Transitional Council said only that Younis was gunned down on route to Benghazi, where he had been summoned to discuss “a military matter.”

But a rebel special forces officer under Younis’ command said Younis was taken before dawn Wednesday from his operations room at Zoueitina, just east of the main front with Gadhafi’s forces.

Fighters from a rebel faction known as the February 17 Martyr’s Brigade came to the operations room and demanded Younis come with them for interrogation, said an officer, Mohammed Agoury, who was present at the time.

Agoury said he tried to accompany his commander, “but Younis trusted them and went alone.”

“Instead, they betrayed us and killed him,” he said.