Libya’s rebel military struggled Saturday to explain an apparent rift within its highest ranks while acknowledging its soldiers’ role in a mistaken NATO bombing of rebel columns the night before.

The strike, which killed 13 rebels and injured seven, illustrated the hazards of conducting an aerial bombing campaign against a fluid and fast moving front line. Several cars and an ambulance were also incinerated, and opposition leaders said rebels may have been responsible for the bombing because they had fired their guns into the air in celebration.

“It was a terrible mistake, and we apologize, and we will not let it happen again,” said Abdul Hafidh Ghoga, vice president and spokesman of the opposition’s Transitional National Council.

The opposition and forces loyal to Moammar Gaddafi increasingly appear locked in stalemate, with the rebels controlling most of the eastern part of the country but unable to oust the Libyan leader from power. Early Sunday, government forces shelled the city of Misurata, the only major rebel holdout in the western half of the country, Reuters reported. The city has been the scene of fierce battles in recent weeks.

Many of the rebels had never picked up a weapon before the uprising against Gaddafi began in February, and the largely volunteer force narrowly missed being routed in March when coalition planes halted Gaddafi’s forces as they reached Benghazi, the rebel capital.

The opposition has said its soldiers have started to receive better training and clearer leadership. But a day after the strike, the interim government sought to distance itself from a popular army commander it had earlier embraced.

Khalifa Haftar, a former army colonel who recently returned to Libya after living for many years in Falls Church, was initially hailed by the Transitional National Council as a leader who could help discipline the new army and train its largely volunteer ranks.

But Saturday, Ghoga said Haftar had no leadership role in the army.

“We defined the military leadership before the arrival of Haftar from the United States,” he said, referring to the appointment of Abdul Fattah Younis as commander of the armed forces and Omar al-Hariri as the council’s senior defense official. “We told Mr. Haftar that if he wants, he can work within the structure that we have laid out.”

However, a source within the military who is close to Haftar said Haftar is still commanding the army, and that Ghoga’s announcement had upset the public.

“Because of that, today Benghazi is upside down,” the source said, speaking on the condition of anonymity because of the sensitivity of the issue. “They are saying Ghoga has to go. The people, they want Haftar. No one can take him away from the army, or from our hearts.”

Haftar and Younis are known to have had tensions since Haftar joined Younis in early March in Benghazi and was announced as the commanding officer under Younis.

The two men had come to their positions via very different paths. Younis, who was Gaddafi’s interior minister and the commander of the Libyan special forces, broke ranks in February to join the rebels.

Haftar, who took part in the 1969 coup that brought Gaddafi to power, was a hero in Libya’s war with neighboring Chad but changed sides in 1988 and went into exile as an activist against the regime.

Mustafa Gheriani, an opposition spokesman, said Haftar had swaggered into town “like Clint Eastwood,” with aspirations of leadership. But he played down Haftar’s importance to the army.

“There’s been quite a lot of people talking about ‘Haftar’s back, Haftar’s back,’ but most of them don’t know who Haftar is,’’ Gheriani said. “Haftar’s been out of the country for 25 years.”

Asked to explain Saturday’s announcement in light of the council’s earlier embrace of Haftar, he said, “This is the position of the council today. The situation is fluid. . . . The political viewpoints change frequently.”

Rebel army troops seemed unaware of any rift, or of the military’s command structure.

When asked who was commanding the army, one career soldier, Ramzi Ali Mohammad, 31, said, “Khalifa Haftar.”

“No, no,” said another, Abdel Salam Mohammad Ali, 52, a corporal who has been in the army 32 years and remembers Haftar from the war with Chad. “It’s Abdul Fattah Younis.”

“It’s both, together,” said Mohammad, adding that he had seen Younis visit the front line on Friday. “They’re both commanding officers of the war. It’s one operation room and two minds.”

The front line has in past days reportedly been more organized than in the past, with more experienced soldiers positioned farther forward and newer volunteers held back. Still, the line has seesawed for several days, centering on the town of Brega. Ghoga said that by Saturday evening, Brega was in rebel hands.

Earlier in the day, rebel soldiers buried the dead from the previous night’s airstrikes. Gheriani said that such incidents need to be accepted as part of war.

“In such a brutal campaign that Mr. Gaddafi is waging against his own people, mistakes may happen, collateral damage may happen,” he said. “We regret what happened, but we understand that when you consider the big picture, sometimes you have to give up some lives to save the nation.”

But Iman Bugaighis, an opposition spokeswoman, said a publicity campaign was underway in mosques and on the radio to try to stop rebels from firing their weapons arbitrarily into the sky, a common practice.

Safety concerns aside, she said, “these ammunitions are very valuable because we have to use them on the front lines. We are trying to get the message out.”