Pakistan’s powerful military will probably push for an increase in defence spending ahead of Friday’s national budget as border clashes with India and Afghanistan mount.

Relations with its neighbours have drastically deteriorated this year. On Tuesday, India’s military said it hit army posts in the Pakistan-administered part of Kashmir that it said were providing cover for insurgents planning attacks, a claim that Pakistan’s forces denied. Late Wednesday, Pakistan’s army said Indian troops fired at United Nations military observers on the Pakistani side of the de facto border. The UN said that while gunshots were heard, they weren’t targeted.

The nuclear-armed nation has also repeatedly closed its border with Afghanistan following a spate of bombings in February, which Pakistan’s military blamed on insurgents operating inside its neighbour, and after cross border shots were exchanged between the two country’s armed forces this month.

“While the Indian threat remains on Pakistan’s eastern border permanently, border escalations with Afghanistan” are also a concern, said Khadim Hussain, a Peshawar-based defence analyst and author of “The Militant Discourse.” “This, of course, will make the security establishment press for a significant increase in the defence budget,” which may rise by 30 per cent, he said.

Prime Minister Nawaz Sharif heads into an election battle next year and is widely seen as the front-runner for a second term. Managing public opinion as border clashes continue and the need to protect more than $50 billion (Dh183.5 billion) in Chinese-financed infrastructure projects mean he’s unlikely to push back against requests for more military spending at a time when the economy shows signs of stress.

Despite the economy expanding at a rate of 5.3 per cent annually, Pakistan’s current account deficit tripled to $7.3 billion in the ten months through April and its trade gap expanded to $3.2 billion in April, close to lowest level hit a month ago since Bloomberg started compiling data in 2003.

A spending hike may also be needed to fund increased protection for the Chinese infrastructure projects, said Sakib Sherani, chief executive officer of Islamabad-based research company Macroeconomic Insights.

More troops will be added to a 9,000-strong special force raised to protect Chinese workers, Minister for Planning and Development Ahsan Iqbal said in interview on Monday, without providing further details.

Pakistan’s military, which has ruled the country for much of its life since it gained independence 70 years ago, continues to influence key foreign policy decisions and holds a considerable grip on the economy.

The armed force’s institutional stance against India, its larger rival since partition at the end of British colonial rule, has provided a basis for the security establishment’s over-sized funding demands, Hussain said. The military has also long been accused of supporting militant forces to push its geopolitical goals.

Mutual distrust has also strained relations between politicians and the army, which is seen as one of Pakistan’s better-run institutions. To many the military has always taken a disproportionate amount of the budget at the expense of spending on the country’s education and health. The armed forces are also considered unaccountable and have a history of removing democratically-elected leaders.

Sharif, who in a previous stint in power was toppled in a 1999 coup by his then chosen army chief Pervez Musharraf, has an uneasy relationship with the military. Last year his government raised the defence budget by 11 per cent to Rs860 billion ($8.2 billion) or about a fifth of Pakistan’s overall spending.

A separate Rs100 billion was also allocated for a military offensive against domestic militants and to support people displaced by the operations.

With that has come a sharp decline in attacks across South Asia’s second largest economy. Military operations were ramped up across the country after the Pakistani Taliban massacred more than 100 schoolchildren in the northern city of Peshawar in December 2014.

Fatalities from insurgency fell 32 per cent in first quarter of 2017 compared with the previous year, according to the Islamabad-based Centre for Research and Security Studies.

Yet major attacks still happen. This month a motorcade carrying the deputy chairman of the Senate was hit by a bomb blast and at least 10 Pakistani labourers were killed in Balochistan, a southern province that has long been racked by separatist unrest and where China is developing a flagship port in Gwadar.

In a February interview, Pakistan’s Finance Minister Ishaq Dar pledged that the government wouldn’t go on a spending binge before the elections. However, Planning Minister Iqbal said the government will provide “all resources” needed by the military.

“We can’t afford any sort of complacency,” Iqbal said.