The top suspect in the Paris attacks narrowly dodged capture earlier this week by scaling an apartment building rooftop before authorities finally nabbed him for good on Friday, according to a Belgium terrorist expert.

Dedicated police work for four months straight — plus some lucky breaks — led to Salah Abdeslam's arrest, said former intelligence officer Claude Moniquet, who has contacts in the French and Belgian intelligence communities.

"No one in the intelligence community in Europe knew where Salah Abdeslam was," Moniquet told NBC News. "I asked them about Salah and they told me both in Belgium and France that the trail is absolutely cold."

Teams from both countries had conducted 100 house searches in Brussels since the Nov. 13 Paris terror attacks that left 130 people dead, Moniquet said, raiding homes of Abdeslam's family and friends. But nothing.

"The pressure was extremely high, and all of this game of pressure was to close the doors, to diminish the number of options," Moniquet said.

Authorities in France and Belgium have not shared many details of the days leading up to Abdeslam's arrest. But Moniquet said it wasn't until this week that investigators knew they were on the right track.

This past Tuesday, during a routine search of a Brussels apartment that resulted in the death of Algerian Mohamed Belkaid, a suspected ISIS fighter, authorities found fingerprints belonging to Abdeslam, Belgian prosecutors announced.

Belkaid's presence surprised the security forces because the apartment had shown no signs of activity nor had electricty or water. When they tried to enter, shots were fired back at them, wounding three police officers; a siege ensued, and Belkaid, a friend of Abdeslam's, was killed.

Two people fled the apartment when police entered, Moniquet said. They had no idea at the time that one of them was the subject of their international manhunt.

They later found out a neighbor had snapped photos of the two escaping by the rooftop — and authorities recognized Abdeslam in the pictures. Knowing they were closing in on him, investigators started poring over cellphone records of possible contacts for Abdeslam.

"That gave some results," Moniquet said. "Some of them were tracked to the district of Molenbeek," Abdeslam's hometown where he was ultimately captured, he told NBC News.

One of Abdeslam's brothers blew himself up the night of the coordinated carnage in Paris last November. His funeral, however, didn't take place until this past Thursday "by an extraordinary coincidence," Moniquet said, giving police the chance to interrogate relatives and friends of the family a day after finding Abdeslam's fingerprints.

"There was a police informant, and they got a tip from this man," he said. "At this time, the knew that Salah Abdeslam was in this house."

Abdeslam, 26, was shot in the leg and arrested Friday along with four others. Originally, Moniquet said, the plan was to storm the apartment that night, but police were forced to do it earlier because of leaks in the press.

The entire operation took just 10 minutes, Moniquet said.

"Finally they got him — by chance and because they conducted extraordinary police work for four months, day after day," Moniquet said.