The return of England's cricket team to Pakistan next year -- their first visit since a deadly 2009 attack on Sri Lanka's team -- is a vote of confidence in the country's improved security, but analysts say challenges remain.

Cricket-obsessed Pakistan spent a decade in international sporting isolation after gunmen targeted the Sri Lankan team bus in Lahore during a Test series, killing eight people and wounding several players and officials.

The assault marked another dark chapter in Pakistan's long battle with militancy and extremism that has led to tens of thousands of deaths and ruined the country's international image.

Pakistan have been playing home fixtures in the United Arab Emirates
Pakistan have been playing home fixtures in the United Arab Emirates AFP / -

But a years-long army clampdown has seen steady improvements in Pakistan's security situation, and several nations have softened travel advisories as a result.

"Perceptions of Pakistan need to catch up with the reality, and things have changed here a lot in the last five years," said Christian Turner, the British high commissioner to Pakistan.

He said security incidents had dropped by 80 percent since about 2015, and credited the "hard work" of Pakistan's government.

Security is extremely tight for international cricket in Pakistan
Security is extremely tight for international cricket in Pakistan AFP / Aamir QURESHI

"Cricket is in our blood and one of the many bonds that bind us together," Turner said in a statement to AFP.

England will play two Twenty20 internationals in Karachi on October 14 and 15 in their first visit to Pakistan since 2005.

The announcement follows Pakistan's trip to England over the summer, when they played Tests and T20s despite Britain being one of the countries worst hit by the coronavirus pandemic.

Pakistan, one of international cricket's financially poorer leading sides, thus helped spare England, one of the wealthiest, an estimated ?280 million ($366 million) loss if all the ECB's scheduled matches were wiped out.

Pakistani cricket fans are known for their passionate support
Pakistani cricket fans are known for their passionate support AFP / AAMIR QURESHI

Pakistan have recently hosted Zimbabwe, the West Indies, Sri Lanka and a World XI. Several English players have also played in Pakistan's Twenty20 league.

Security analyst Qamar Cheema said such events can improve Pakistan's image overseas.

"After making colossal gains against extremism and radicalisation, Pakistan wants the world to look at it as a normal country," Cheema told AFP.

The Pakistan Super League final was held in Karachi this week
The Pakistan Super League final was held in Karachi this week AFP / Asif HASSAN

"Pakistan's security environment is now conducive for international sports... the military and law enforcement agencies have done enough," he added.

But observers warn that Pakistan is not tackling the root causes of religious extremism and militancy, and armed groups retain the ability to carry out attacks, including in urban areas.

"Room for ideologically motivated individual attacks always remains," Cheema noted.

Still, officials hope major sporting events will help shift an international perception of Pakistan from "terrorism to tourism destination" -- a phrase Prime Minister Imran Khan's political party has used.

"It is a big achievement for the security apparatus of Pakistan. The more sports come to a country, the more the name of that country goes out (internationally)," security analyst Imtiaz Gul told AFP.

Last year, Islamabad introduced an electronic visa system, making it easier for visitors to come, and British Airways announced its return to Pakistan after more than a decade. Virgin Atlantic will launch flights from Britain to Pakistan in December.

Pakistan greets foreign teams with presidential-level security, with elite commandos providing protection for players.

Squads travel in heavily armed convoys, with roads to venues sealed off, creating a headache for commuters and fans trying to reach matches.

Snipers are positioned on nearby rooftops and spectators have to go through multiple security barriers after parking their cars far from the venue.

"Security arrangements do create some inconvenience for the time being for common people, but this is a price that is worth paying for organising an international sports event", Gul said.

Before England come, South Africa are due to visit Pakistan in early 2021.

"Once the England tour is completed next year I am sure other major countries will also have confidence in our arrangements," said Pakistan's head coach and former captain Misbah ul Haq.