NAQOURA, Lebanon — The head of U.N. peacekeepers in Lebanon praised their contribution to peace efforts on Monday as the force marked 40 years since its establishment on the frontier with neighboring Israel.

Maj. Gen. Michael Beary, commander of the force known as UNIFIL, said that the mission “works tirelessly to pre-empt a return to conflict, a return to turmoil and loss of life, a return to some of the dark days of the past” between the two countries.

His comments came amid new threats between Lebanon and Israel over several issues, including a wall the Jewish state is building along the border that Beirut says may jut into Lebanese territories, as well as plans for oil and gas exploration in the Mediterranean.

The oil and gas dispute dates back years, but recently resurfaced when Lebanon invited companies to bid for exploratory offshore drilling next year along the countries’ maritime border. Israel says some of the drilling would be taking place in its territorial waters.

The peacekeeping force was founded in 1978 after Israel invaded parts of southern Lebanon. Violence has broken out on several occasions since then, including major wars in 1982 and 2006.

UNIFIL now has about 10,500 soldiers from 41 countries who are mostly deployed south of Lebanon’s Litani river and along the border with Israel.

The 2006 war was fought between Israel and Lebanon’s militant Hezbollah group, and claimed the lives of more than 1,000 people on both sides.

Beary warned that conflict “can start in an instant, can take generations to find a permanent solution.”

“South Lebanon has enjoyed 11 years of calm since 2006, and the last two years in our areas of operations, in particular, have been among the quietest on record,” Beary said. “UNIFIL works together with the parties to sustain this calm.”