By Simon Cameron-Moore ISLAMABAD, Nov 17 (Reuters) - British Prime Minister Tony Blair will visit Pakistan "shortly" for talks that will focus on security in Afghanistan, where 5,000 British troops are serving with a NATO force fighting a Taliban-led insurgency, Pakistan's Foreign Ministry said on Friday. Britain has lost 41 soldiers in Afghanistan since the Taliban was ousted by U.S.-led forces in late 2001, and more than half of those fatalities died this year, fuelling criticism of Blair for his unflagging support for U.S. policy in Afghanistan and Iraq. British diplomacy scored a success in Pakistan ahead of his visit with the release on Friday of a British Muslim man, Tahir Mirza Hussain, who had been sentenced to hang, after spending 18 years in jail for a murder he says he didn't commit. The Pakistan Foreign Ministry said Blair was due shortly but gave no details of his schedule due to security concerns in a country where many believe Osama bin Laden is hiding, and where President Pervez Musharraf is regarded as a traitor by jihadi groups sympathetic to al Qaeda's cause. It said the conflict in Afghanistan would be a priority in talks. "Areas of prime concern obviously remain the situation in Afghanistan, stability along the Pakistan-Afghanistan border and even closer cooperation and consultations to deal with the challenges," the ministry said in a statement. "These engagements are also necessitated by the presence of British troops in the most treacherous southern region of Afghanistan," it said. INFILTRATION British troops in Afghanistan have come under heavy fire from Taliban fighters since deploying this year. Pakistan has had to defend itself against criticism, notably from the Afghan government, that it is doing too little to curb infiltration by militants into Afghanistan despite stationing close to 80,000 troops on the border. Britain and the United States have given cautious backing to a treaty signed on Sept. 5 between the Pakistan government and tribal elders in its North Waziristan tribal region, that critics say amounted to creating a sanctuary for militants. British forces in Helmand, however, have followed a similar course in hopes of dampening support among tribesmen for the insurgency. Blair's visit to Pakistan follows a warning from the head of Britain's domestic spy agency that Muslim militants are plotting at least 30 attacks in Britain. Pakistan helped British and U.S. intelligence agencies in August to thwart a plot to blow up airliners flying from London to the United States. Four British Muslim suicide bombers killed 52 people in London in July last year and at least two of the bombers had visited Pakistan. Nearly three-quarters of a million British Muslims have roots in Pakistan. The Pakistan Foreign Ministry said Britain had agreed to increase aid to Pakistan to 480 million pounds ($905 million) over the next three years from 236 million pounds ($445 million).