TRIPOLI, Lebanon — An army deserter attacked a military patrol in north Lebanon killing two soldiers and wounding another before turning the gun on himself, a security official said on Wednesday.

The attack late on Tuesday in the Akkar border region of Lebanon was carried out by Ali Taleb, a 30-year-old soldier who deserted from the army three years ago and has long been sought by the security forces, the official said.

Taleb, who had been described as anti-social and violent, launched the attack on the army patrol at around 9:30pm on Tuesday, the official said, speaking on condition of anonymity.

After killing the two soldiers, one of them an officer, and wounding a third, Taleb shot himself dead with a pistol despite pleas by relatives to give himself up.

A young man who was with Taleb at the time has been arrested and an inquiry launched to determine the motive for the attack, the official said.

Many inhabitants of Akkar, a coastal plain near Lebanon’s border with Syria, are soldiers, and employment by the military is the main means of escaping the abject poverty of the region.