KARACHI -- Terrorism, corruption, misrule: Negative perceptions have dogged Pakistan for years. But thanks to sweeping operations by the army and a powerful paramilitary force, those perceptions may be becoming outdated, and businesses are taking notice.

In Karachi, the country's largest city, motorcycles and elaborately decorated buses weave down dusty roads between colonial-era buildings. Less than a decade ago, these were truly mean streets. "Between 2010 and 2012, we saw one or two terrorist attacks every month and one or two targeted killings and kidnappings for ransom every day," recalled Army Maj. Gen. Mohammad Saeed. "There were 17 no-go areas which the police could not touch in Karachi."

At the time, even major hotels had occupancy rates of just 10% to 15%. Hundreds of shops and other businesses closed down.

Then the Rangers began to clean up.

The Pakistan Rangers, a paramilitary law enforcement organization overseen by the military and the Interior Ministry, set out to tackle the violence head-on. In 2013, the Rangers Sindh -- which operate in Sindh Province, including Karachi -- mobilized 15,000 troops. The provincial legislature granted them broad powers to search homes and make arrests, enabling them to quickly turn the tide.

These guns were seized at a hideout in Miranshah -- the front line of Pakistan's anti-terrorism operations. (Photo by Go Yamada)

In 2017, there were zero bombings and only five kidnappings, according to Saeed, who serves as director general of the Rangers Sindh. This is no small feat in a city with a swelling population of 17 million -- perhaps even 20 million if migrants from rural areas are factored in. "We destroyed all of the terrorists' pockets," he said, adding that hotel occupancy rates are over 90%.

The story is similar in Pakistan's other major cities. And as the Rangers have made headway, business sentiment has improved and growth has picked up.

Mohammad Saeed, director general of the Pakistan Rangers Sindh

Pakistan's real gross domestic product grew 5.3% in the fiscal year through June 2017, the quickest pace in 10 years. The central bank projects the growth rate for this fiscal year will approach 6%. Inflation has stabilized and exports are brisk.

"Unfortunately, Pakistan is a victim of negative perception," said Arif Habib, who heads the conglomerate Arif Habib Group. "There is a lot of difference between perception and reality."

But the rest of the world seems to be catching on to the positive changes, too: Foreign direct investment is estimated to reach a record $5 billion or so in the current fiscal year, up from $3.43 billion last year.

Last June, in a survey by the Overseas Investors Chamber of Commerce & Industry, 89% of respondents said security concerns in Karachi had receded since 2013.

The OICCI is made up of 193 companies, mainly major foreign businesses in Pakistan. Each year, it surveys the members about factors that are hampering investment in Pakistan. "The top answer in 2015 was 'security, law and order,' but it fell to third place in 2017," said OICCI Secretary-General Abdul Aleem, who served as the chief executive of a state-run company. "It was overtaken by 'tax burden' and 'policy implementation.'"

This is not to say Pakistan's safety problems are a thing of the past. The budget for maintaining security is insufficient, and efforts to shore up the police are still a work in progress. Another major challenge is to prevent militants who have fled to neighboring Afghanistan from coming back.

Treacherous borderlands

Miranshah is a one-hour military flight away from Peshawar, in Pakistan's northwest. It is the main city in North Waziristan, one of the semi-autonomous Federally Administered Tribal Areas.

This is the front line of Pakistan's anti-terrorism operations. The Afghan border is just 20km away.

Around 2008, insurgents from al-Qaida and Tehrik-e-Taliban Pakistan controlled some 30% of North Waziristan. But large numbers of militants have fled or been killed since the army began weeding them out in 2014.

More than 300 people died in terrorist attacks in the FATA in 2014, but the number was down to 113 in 2017.

"During the operation, 26,000 rifles, 13,000 submachine guns and explosives for more than 50,000 suicide bombs [were seized]," said Col. Wasi Uddin in a bunker at the heavily guarded headquarters of the army's 7th Infantry Division. Monitors on the wall showed real-time footage of the border with Afghanistan.

Now that the heavy fighting appears to be over, people are returning and efforts to rebuild houses and public facilities are in full swing. The army is spearheading a drive to reopen hospitals, schools and bazaars in the FATA. Residents have been given 130 sq. km of farmland as well as job training programs.

"Now we are building a 1,400km-long fence along the border to stop the cross-border terror," the colonel said. But sporadic attacks are still a threat in the mountainous border region. A young military officer and another person were killed in an ambush on the outskirts of Miranshah in mid-December.

Pakistan's national security adviser, retired Gen. Nasser Khan Janjua, blames the neighbor. There is "no border control in Afghanistan," said Janjua, who has sparred with the U.S. over security measures. "In 2016, out of 128 terrorist attacks in Pakistan, 125 were cross-border terror from Afghanistan."

There are 145 monitoring posts on the Afghan side of the border -- around one-eighth the number on the Pakistani side -- reflecting the capacity constraints of the Afghan military and police.

Police accountability

Over in Peshawar, at the base of the Khyber Pass on the Pakistani-Afghan border, a determined effort to bolster the police is bearing fruit.

The city is a key hub for trucks carrying goods to and from Afghanistan. Freshly slaughtered lamb, mutton and live peafowl can be found at the local bazaars. Men tend to carry rifles -- a symbol of masculinity -- but violence has decreased significantly, according to the police chief for Khyber-Pakhtunkhwa Province.

"From 2007 to 2017, [the number of] dead and wounded in the province decreased to one-sixth," said Inspector General Salahuddin Khan. The police head count has surged to 82,000, from 34,000 in 2001, and the force receives training from the army.

A Karachi bazaar bustles with shoppers in December. (Photo by Go Yamada)

Khan and other police leaders are focusing on "depoliticization, digitization and confidence." They reject politicians' interference with recruiting, and have created a database of rented houses and vehicles terrorists might use.

"For security, cooperation from the local people is essential," Khan said. This includes holding the police themselves accountable: The government has established a Dispute Resolution Council, which includes third-party members appointed by a high court, to receive complaints against law enforcement.

Khan is not satisfied. "Support from the government is better than it used to be," he said. "But the budget is never enough. We are [making requests] all the time."

In Karachi, there is still a sense of unease despite the obvious improvement. Some government officials and foreign businesspeople still ride around in bulletproof vehicles with their own security details.

For now, the Rangers are keeping the pressure on. If police capabilities improve, Saeed said, "we will pull back."