ISLAMABAD, Pakistan — His country nearly went to war with a neighboring enemy six and a half times its size. Militants lurk in religious schools and in the countryside.
And with inflation soaring and debt ballooning, his finance team is scrambling, desperate to secure a multibillion-dollar rescue package to avoid economic collapse.
But Imran Khan, Pakistan’s prime minister, is apparently feeling confident about his first eight months in office — so much so that he invited a group of foreign journalists for an informal, hourlong chat on Tuesday in Islamabad, the capital.
While he seemed subdued, with puffy circles under his eyes, Mr. Khan also sought to project resolve — particularly about ridding Pakistan of the militants it once tolerated.
“We have decided, for the future of our country — forget the outside pressure — we will not allow armed militias to operate anymore,’’ he said.
“The Pakistan Army created them,’’ he said, referring to the 1980s when Pakistan and the United States backed Muslim insurgents in Afghanistan against Soviet forces.
But, he added, “there is no use for these groups anymore.’’
Mr. Khan, 66, sat in a brightly lit drawing room on a gold-painted chair. He wore a long white shalwar kameez with the sleeves crisply pressed and spoke about corruption, poverty and trying to make peace with the Taliban.
He reminisced about traveling the world as an international cricket star and expressed alarm about India’s shift toward Hindu nationalism and the rising crimes against India’s Muslims.
India used to be “a very open society,’’ he said. “I never thought that I would see what is happening in India right now. Muslim-ness is being attacked.’’
In August, Mr. Khan took over as the elected leader of one of the world’s most troubled countries. And he did with a shadow over him.
Many observers said that the election was deeply flawed and that Mr. Khan had been secretly helped by Pakistan’s powerful military, which cleared a path for him by harassing and threatening his political opponents. In many ways, he was a curious choice.
Pakistan is a conservative Muslim nation, and Mr. Khan, by contrast, was once an international playboy and celebrity athlete. He befriended notables such as Princess Diana in a high-flying life that could not be more different from the lives of most Pakistanis, though in recent years he has mellowed and turned more toward Islam.
He has struggled to right the economy and get the security forces to more effectively crack down on militant groups that shelter in Pakistan. An international watchdog group, the Paris-based Financial Action Task Force, is on the brink of blacklisting and sanctioning Pakistan.
“We can’t afford to be blacklisted,’’ he said on Tuesday.
But Mr. Khan has also won praise for his seemingly coolheaded and statesmanlike behavior during the recent crisis with India, which he helped de-escalate by releasing a captured Indian pilot and emphasizing peace. He seemed quite cognizant that the last thing Pakistan needed was a war.
On Feb. 26, around 3:30 a.m., Mr. Khan said he was awakened by a phone call. A top military official told him that Indian warplanes had just crossed the border and conducted airstrikes on Pakistani soil.
Pakistan and India have been bitter enemies since 1947 when Britain decolonized the Indian subcontinent and created two nations: the mostly Hindu India, and the mostly Muslim Pakistan. The two have warred several times.
This time, the spark was a suicide bombing in the disputed territory of Kashmir that killed dozens of Indian soldiers. India blamed Pakistan for supporting the militant group behind the attack and vowed revenge.
After learning that the Indian bombs had fallen into an empty ravine around Balakot (India said the bombs had struck a terrorist training camp), Mr. Khan said Pakistan opted for a measured response and bombed an empty area just across the Indian border.
“They hit our trees, so we thought we’d hit their stones,’’ he said.
When asked whether he or the country’s military establishment controls Pakistan, Mr. Khan said that they work closely. Independent analysts don’t disagree, but many Pakistanis still see Mr. Khan as the army’s puppet.
Even some of Mr. Khan’s own ministers have said that they worry the relationship could sour if Mr. Khan, famous for self-confidence and unpredictability, crosses the army bosses.
But in this case, after Pakistani forces shot down an Indian fighter jet and captured the pilot, Mr. Khan and the military seemed to agree the best response was to release the pilot, which eased tensions.
“I’ve played down the whole thing,’’ he said.
Now Mr. Khan is back to wrestling with the economy.
Pakistan has struggled for years with high unemployment, extremely low rates of tax collection, runaway corruption, and sluggish exports. The country’s trade deficit had swelled to $33 billion when Mr. Khan took office in August.
He blames Pakistan’s economic problems on his predecessors, especially the Sharif family, his political rivals.
“You can’t have the ruling elite siphoning off money and taking it abroad,’’ he said. “If you don’t hold them accountable, the country has no future.’’
With barely enough foreign reserves to cover the country’s monthly import bills, Mr. Khan’s government knows it needs a large bailout from the International Monetary Fund, but those often come with painful austerity conditions. His finance team has been reluctant to turn to the I.M.F. but now promises that a deal will be announced in the coming weeks.
On the streets, discontent is rising. People grumble about rising prices. Mr. Khan’s government is trying to slow down demand to keep the trade deficit from growing even bigger.
But his government’s decisions to raise levies on fuel and collect more taxes from ordinary Pakistanis, even if necessary for the economy’s long-term health, have made people even angrier. Economic growth is forecast to slow further, leading to even more joblessness.
Nonetheless, Mr. Khan said, “my first priority is to take 100 million people out of poverty.’’
Pakistani analysts say his priority is genuine but question how Mr. Khan can possibly pay for it.
“I’ve been pretty consistent of my criticism of the P.M. going back a long time,’’ said Mosharraf Zaidi, a newspaper columnist. “One thing that I cannot criticize him for is the core purpose of his being in public life, which is compassion.”
As far as India, Mr. Khan could not resist a few digs. He said that India’s prime minister, Narendra Modi, had opted for airstrikes to please a domestic audience — India begins holding elections on Thursday.
But he added that Mr. Modi’s government might actually be the best possible option for settling the Kashmir conflict, because right-wing Hindus would support Mr. Modi in achieving it.
“We have more chance for peace,’’ he said, and then added with a smile, “except for this glitch of India’s election.’’