“How many of your judges are corrupt?” I was asked earlier this week by a Pakistan lawyer.

“None” I replied.

“How many of your judges are corrupt then?”

“Oh, 70 per cent in the lower courts, 40 per cent in the higher courts – and that is a conservative estimate”.

This exchange took place in Lahore, the beautiful garden city capital of the longest Pakistan province, Punjab.

Lahore has been the centre of the lawyers’ movement against the now deposed President, General Pervez Musharraf.

Musharraf took office in a military coup in 1999 saying he would hand power back to citizens by 2002.

But 2002 came and went (as did the six subsequent years) and he always found the case for staying in office stronger than that of retirement.

He sought to prop up his position by changing the law, and by ensuring that the courts always gave him the answers he needed.

Then the worm turned. Last November he wanted to stay on for a further, third term as President.

The Supreme Court suddenly found its voice, and said this was unconstitutional.

Faced with the wrong answer, Musharraf sacked the judges, placing many under home arrest, and replaced them with those who would give him the right answer.

Surprise, surprise, they did. But what Musharraf had not bargained for was that this was the moment that he pushed his luck too far.

The Lahore lawyers led huge protests against Musharraf.

There were tumultuous events, including the appalling assassination of the People’s Party leader Benazir Bhutto on December 27 last year.

But the elections in mid February this year were pretty clean.

A new, democratically elected government led by the People’s Party is in post.

Musharraf was finally forced to step down early last month.

All the sacked judges have been freed from custody. Many have been reinstated.

Pakistan is a great country with much going for it.

There was a real sense of hope in the air – which I had not experienced in many previous visits during the nine years of military rule.

But turning that hope into a reality of stable democratic institutions depends above all on an independent, skilled and incorruptible judiciary.

When I replied to the Pakistan lawyer’s question about corrupt UK judges with an emphatic “none” I did not add the customary caveat “so far as I know”.

Of course, one can never be 101 per cent certain that there is no corruption whatever in our system.

But I am as sure as I can be about this. People can and do complain about the courts and our judges. I see many of their complaints as a Minister.

Sometimes, the complaint is that the verdict or court ruling went against them; sometimes of inefficiency, or of rudeness or inappropriate behaviour.

There is much that needs to be improved, to make both the criminal and civil systems speedier and cheaper.

But our judiciary is rightly trusted for its competence and its integrity.

If our courts think that public authorities – including Ministers – are in the wrong, they will speak out.

We take all this for granted. This rule of law, ensuring justice for everyone, is one of the foundations of our stable society.

You really see what can happen if that confidence is not there – and I did this week.

But Pakistan’s position is sadly far from exceptional.

Probably a majority of nations in the world have the same challenge.