Updated

Gunmen cheerfully shared coffee and cigarettes with men they have tried to kill with assault rifles, grenades and mortars. Women on balconies hurled rice to celebrate. Men chanted giddily to welcome soldiers deploying to the streets of this northern Lebanese city.

In a day as joyful as it was unlikely, weary residents of two Tripoli neighborhoods on Wednesday celebrated as hundreds of Lebanese soldiers deployed in the most determined plan yet by the government to stabilize an area that for the past year has been increasingly drawn into the civil war in neighboring Syria.

Khaki-clad Lebanese soldiers in APCs used bulldozers to scrape away sandbag fortifications used by gunmen, pushing aside dumpsters used as barricades. Residents spoke of arrest raids targeting wanted gunmen. The 3G cellular connection was cut, preventing gunmen from using the WhatsApp messaging system.

"They threw rice on me! It's like a dream," said 19-year-old Abdullah as he walked in a spontaneous demonstration for unity between rival neighborhoods.

The security plan is an important test case for whether Lebanon can reverse its slide into conflict, fueled by violent sectarian tensions trigged by the war next door, particularly between the country's Sunnis and Shiite Muslims.

Bab Tabbaneh is mostly Sunni, whose residents support Syrian rebels in their war to overthrow President Bashar Assad. Jabal Mohsen residents are mostly Alawite, and loyal to Assad, who shares their faith, an offshoot of Shiite Islam.

The Syria tensions added to decades of bad blood between the two areas, stretching back to Lebanon's 15-year civil war that ended in 1990.

Exhaustion and frustration with months of fighting likely contributed to the jovial mood Wednesday, which many skeptics predicted would not last. Even among the celebrations, residents said their rivalries hadn't ended.

Some young men in Bab Tabbaneh skulked in back streets, eyeing soldiers as they smoked water pipes. A group of men near a juice stand resentfully hurled fireworks on the ground near soldiers.

But the pause in fighting offered relief from flaring clashes that have killed over 200 people in the past three years. The clashes have destroyed businesses, impoverished families and battered the two neighborhoods, where buildings are riddled with bullets and gaping mortar holes.

"People here are fed up of clashes and shelling. We don't want to see any more houses under fire or any more families forced to flee," said Abdul Qader Hamzeh, 28. "We don't want to face what the Syrians are facing."

The pause also reminded residents of older family ties between the two areas, connected by alleys and a shared sense of abandonment by the state.

On a street where only snipers trod, two old friends hugged and laughed.

"Jabal Mohsen and Bab Tabbaneh are only two steps from each other," said Abu Yusef, of the Alawite neighborhood. "Politicians intervened so they could destroy us," said the 30-year-old. His friend, Abu Haitham, a Sunni, said some of his relatives married Alawites of Jabal Mohsen, and he struggled with the idea that they were enemies.

Abu Yusef joked that he was going to find a Sunni bride.

Nearby, young men in Bab Tabbaneh cheered around soldiers patrolling on foot and in armored vehicles, shouting: "The people and the army are one hand!"

Last week, two Lebanese soldiers were killed during their deployment here.

On Wednesday, dozens of young men rushed to a muddy alleyway linking the two neighborhoods, some trying to enter, others peeking curiously. Lebanese soldiers pushed metal barriers to stem the chaos.

One Alawite fighter, Abu Ali, pointed to where he usually aimed his guns at Sunnis below — an area now occupied by Lebanese soldiers. Later, he chatted with gunmen from Bab Tabaneh.

"It was nice," he said. "I hope we go back to the way we were before, when we married from them, and they married from us."

Echoing a refrain across the two neighborhoods, he said the state hadn't provided enough security to quell flaring problems, and that residents carried weapons for self-defense.

"Where was the army before?" grieved Rania Idlibi, 37, of Jabal Mohsen — a Sunni who married an Alawite decades ago.

Soldiers had deployed in the past, but rarely for long, because they never had enough backing from all of Lebanon's quarreling sides to act firmly.

Even in this deployment, which began Tuesday, top wanted men fled — or were allowed to flee. Lebanese military officials would not comment.

Lebanon's politicians are deeply divided over the Syrian war, and until February, the country was left without a government for nearly a year over it.

The government is now expected to limp along until a new president is elected by March 25 and forms his own cabinet.

Many residents said they were enjoying the deployment as a respite from battles they considered pointless but fueled by Lebanon's persistent political instability.

"We are poor here and they are poor there," said Idlibi. "All these people who died — who did they die for?"