(Adds details throughout on incident)
TRIPOLI, Feb 6 (Reuters) - Unidentified gunmen tried to storm into the Libyan army command headquarters in Tripoli on Thursday, clashing with soldiers there before stealing a few rifles and some vehicles, the army and a military source said.
The details of the incident were not clear and there were no immediate reports of any casualties at the army chief of staff headquarters in the south of Tripoli.
"We clashed with them when they tried to enter, but they left," said Ali al-Sheikhi, an army spokesman.
One army source at the base said the clash occurred at the gate of the command building and gunmen stole a few Kalashnikov rifles and at least four cars.
Another senior army officer, who asked not to be identified, said he believed it was a dispute between guards at the military base.
Nearly three years after the revolt against Muammar Gaddafi, Libya's army is still in training, and is often no match to the heavily armed former rebels and militia brigades who battled to oust him but now refuse to demobilize.
Tensions are high in Libya before Friday, the official end of the mandate of the interim parliament that was elected into office in 2012 but has since failed to progress much in the country's transition to full democracy.
Many Libyans are divided over the future of the parliament, which voted to extend its mandate until later this year to provide some continuity while a special committee writes a new constitution for the North African country.
Two major rival militia brigades, the Zintanis and the Misratans, are allied with competing factions in the General National Congress, whose members voted to stay on until elections later this year. (Reporting by Ghaith Shennib and Feras Bosalum; Writing by Patrick Markey; Editing by Tom Heneghan)