Image copyright ISPR Image caption Awais Ali Shah has been reunited with his family

Security forces in Pakistan have rescued the son of a senior judge who was abducted in the city of Karachi last month, the military says.

Awais Ali Shah, a lawyer, was rescued early on Tuesday near Tank, a town close to Pakistan's tribal region bordering Afghanistan, a spokesman said.

He was found in a car with his legs and hands bound and wearing a burqa.

Three militants were said to be killed in a shootout before he was rescued.

A splinter group of the Pakistani Taliban was responsible for the kidnapping, the spokesman said.

Image copyright ISPR Image caption Mr Shah had his chains removed after being rescued

They were moving Mr Shah at the time.

Who are the Taliban?

The kidnappers had contacted the family of Sindh provincial Chief Justice Sajjad Ali Shah, he added, but did not provide details of what they demanded.

It has been reported that police suspected the kidnappers wanted to use the judge's son as leverage in negotiations to free Islamist militants from jail.

Mr Shah was kidnapped on June 21 in an upscale Karachi neighbourhood.

The scourge of kidnappings - M Ilyas Khan, BBC News, Islamabad

This is the third high profile kidnapping to have ended on a happy note in four months and the fact that Mr Shah was recovered within less than a month is being used by the military's PR wing to enhance its image. The others were rescued after years in captivity.

Militant groups operating in the Pakistan-Afghanistan border region have used kidnappings to boost revenues via ransoms or to secure the release of jailed comrades.

A vast network of inter-connected militant groups and their allied criminal gangs are involved. All three of the victims recently freed were seized in Pakistan's major cities and then shipped hundreds of kilometres on roads manned by security posts to the border region in the northwest. This shows the kidnappers possess considerable local support networks all along these routes.

Kidnappings for ransom was at its height during 2009-14 when hundreds of people - mostly industrialists and businessmen but also diplomats, aid workers, foreign tourists and politicians - were kidnapped each year.

But in recent years there's been a decline. This is partly due to increased military action in the border region that has eliminated previously safe militant havens, and also because of increase security along the connecting routes.

Pakistan has been fighting the Tehreek-e-Taliban Pakistan (TTP) since 2007.

Other high-profile kidnappings have been carried out by militant groups in the country in recent years.

Shahbaz Taseer, the son of murdered Punjab governor Salman Taseer, was finally released in March after four years in captivity.

In May, Ali Haider Gilani, the son of a former prime minister, was rescued after being kidnapped in 2013.