BEIRUT, July 23 (Reuters) - Farmers armed with assault rifles, rocket-propelled grenades and mortars forced Lebanese government troops to abandon an operation to destroy their illegal cannabis crop in Lebanon's Bekaa Valley on Monday, a witness said.

The farmers' attack halted a morning raid by security forces, who had been flattening the tall spiky marijuana plants with tractors, accompanied by armoured vehicles.

No casualties were reported in the ensuing exchange of fire, but two security force vehicles were hit by bullets, the witness said.

During Lebanon's 1975-1990 civil war, the fertile Bekaa Valley produced up to 1,000 tonnes of cannabis resin annually and 30 to 50 tonnes of opium, used to make heroin.

The crop was eradicated under a United Nations programme between 1991-1993 but it has re-emerged as the security forces struggle to control the volatile country.

More recent statistics from the United Nations consider Lebanon to be among the top five countries that produce cannabis resin, used to produce the drug hashish.

Security forces regularly try to destroy marijuana crops but face resistance from farmers who see the lucrative and easy-to-grow crop as valuable income for their impoverished community.

The farmers were likely to have been backed by drug traffickers who are well funded and armed.

A security source said government forces were regrouping and planning a new operation to destroy the crop. (Reporting by Afif Diab; Editing by Alistair Lyon)