By Mark Urban
BBC News, Afghanistan
When we arranged to meet a suicide bomber, we did not expect one wearing his bomb vest, all set to blow himself up outside the building in Kabul where we were filming.
Mark Urban is BBC Newsnight's diplomatic editor
But that is what happened. He was not the one we had arranged to meet.
He was a different suicide bomber.
To be clear, our planned interview was with a captured man at a secret facility, belonging to Afghanistan's equivalent of MI5, the National Directorate of Security or NDS.
The one wrestled to the ground, moments before our car pulled up, was somebody sent to assassinate the NDS officer who arranged our interview.
Somehow he had penetrated hundreds of yards inside the compound.
One of the NDS men proudly showed us his camcorder footage of a clean shaven man lying on the ground, a black bomb vest under his shirt and a hand grenade he had dropped on the floor nearby.
President Hamid Karzai was attacked last weekend
That he was there in that facility will give you a further sense - what with President Hamid Karzai being shot at - both how nowhere in Kabul is safe and how widespread suicide bombing has become in Afghanistan.
The NDS eventually produced not one but two detainees for us to talk to.
Mohammed Ramadan, 22, was one of the attackers of Kabul's Serena Hotel in January.
Eight people died. The NDS said Mohammed killed some of them before he was overpowered, and sitting in that cell, he freely admitted that he had gone to the hotel to murder foreigners.
Shaki Rullah, on the other hand, was a shy boy of 14, who had been sent to the bazaar in Khost, with the aim of blowing up as many shoppers as possible.
He was picked up on a tip-off and seems genuinely horrified by what he got caught up in.
What Mohammed and Shaki have in common is that they are both from Pakistan's tribal areas, both recruited in madrassas - or religious schools - and both thrust into suicide missions.
Shaki said that the men who recruited him whisked him away from the school, before he could even say goodbye to his parents.
Everybody knows that militants have been exploiting lax border controls for years.
But intelligence officers say that the number of suicide attackers has increased in recent months and many believe Pakistan's recent election will do nothing to improve matters.
Britain and the United States are of course fed up with the way their people in Afghanistan and elsewhere get attacked by suicide bombers coming from Pakistan's tribal areas.
While in Islamabad recently, a senior diplomat told me that the United States had warned President Musharraf of Pakistan last year, that if a major terrorist attack in America was traced back to those notoriously unruly fiefdoms, the US would "flatten the tribal areas".
Following this threat, Pakistan began to facilitate some operations by CIA teams.
Pilotless aircraft have been used in several operations recently to hit suspected al-Qaeda safe houses.
The problem for the intelligence agencies is that even President Musharraf's people are very reluctant to lead the CIA to home-grown Pakistani or Afghan militants hiding in the border areas.
What is more, a couple of the parties, who did well in the Pakistani elections, campaigned on the platform of dialogue with the extremists and saying "No" to the US more often.
Back in Kabul, we are ushered into an intelligence operations centre at Nato headquarters.
Inside there are Pakistani, Afghan and Western officers working to improve the security of the border.
This collaborative project would, you would imagine, be regarded as a positive move.
But the officers involved are nervous about being interviewed and filmed.
It takes a good deal of persuasion to get them to agree.
And there, amid the camera-shy rictus of the Pakistani and Afghan officers, is the message.
The border issue is tangled with political sensitivities.
The Afghan government is very reluctant to limit the traditional freedoms of Afghans, moving across a frontier that they barely recognise.
The Pakistanis do not want to be seen co-operating too closely with Nato or the Afghans. That annoys both Islamists and nationalists back home.
So while each of these parties struggles to scale the heights of this diplomatic, military and intelligence landscape, the militants slip through the quiet passes, in between the ungoverned space of the tribal areas.
That is exactly what Shaki Rullah, the 14 year-old, did - heading from his home in south Waziristan towards the crowded market in Khost before he was caught.
Too many get through, killing Afghans and Westerners alike.
And had the man outside the NDS had his way, my own inquiry into why border security still does not work, would have ended on a rainy April morning in Kabul.
From Our Own Correspondent was broadcast on Saturday 3 May, 2008 at 1130 BST on BBC Radio 4. Please check the programme schedules for World Service transmission times.