ISLAMABAD: Pentagon chief Chuck Hagel departed from Pakistan after a brief visit during which he held talks with Pakistani Prime Minister Nawaz Sharif and the country’s new army chief General Raheel Sharif on Monday.

In the first visit by a US defense secretary in nearly four years, Hagel flew from Kabul to Islamabad as Washington seeks to defuse tensions over controversial US drone strikes and Islamabad’s role in Afghanistan.

Hagel warned Pakistani leaders that if they don’t resolve protests stalling some military shipments across the border with Afghanistan, it could be difficult to maintain political support in Washington for an aid program that has sent billions of dollars to Islamabad, defense officials said.

In response, the officials said, Hagel received assurances from the Pakistanis that they would take “immediate action” to resolve the shipment problem. The officials did not provide details on how that might be done.

Just last week, anti-American protests along one of the primary border crossing routes in Pakistan prompted the US to stop the shipments from Torkham Gate through Karachi last week, due to worries about the safety of the truckers. The protests center on the CIA’s drone program that has targeted and killed many terrorists, but has caused civilian casualties.

The defense officials said Hagel described a political reality on Capitol Hill that could complicate support for the billions of dollars of aid Pakistan now receives. It was Hagel’s intent to try and pre-empt any problems with the aid, said the officials who spoke to reporters on condition of anonymity because they were not authorized to discuss the private meetings publicly on the record.

Hagel had back-to-back meetings Monday with Prime Minister Nawaz Sharif and the new army chief, Gen. Tahaeel Sharif, in a move to further repair what has been a strained and sputtering relationship between Washington and Islamabad. Defense officials said Hagel is first high-ranking US official to meet with the Army chief, who took over at the end of last month.

During the meetings some of the more contentious issues also were raised, including Pakistan’s opposition to ongoing CIA drone strikes and Washington’s frustration with Pakistan’s reluctance to go after the Haqqani terrorist network, which operates along the border and conducts attacks on US and coalition troops in Afghanistan. The officials acknowledged that little progress was made other than to agree to continue talking.

Sharif’s office said in a statement the prime minister and Hagel had “in-depth exchanges on a whole range of issues of mutual interest” including bilateral defense, security cooperation and Afghanistan. Sharif’s office also said the prime minister conveyed Pakistan’s deep concern over continuing US drone strikes, “stressing that drone strikes were counter-productive to our efforts to combat terrorism and extremism on an enduring basis,” the statement said.

Shireen Mazari, the information secretary for the political party Pakistan Tehreek-e-Insaf, said in a statement Monday it’s time for the government to speak forcefully to the US to demand an end to the drone attacks. The party is leading the protests.

Pakistan has called the drone strikes a violation of the country’s sovereignty, but the issue is muddied by the fact that Islamabad and the military have supported at least some of the strikes in the past.

Following their meeting in Rawalpindi, Hagel and Sharif echoed each other’s desire to work to strengthen the countries’ ties. The top military men discussed the defense relationship between the two countries and regional stability, according to the Pakistani army chief’s office.

Hagel’s warning to the Pakistanis about the supply route reflects what has been a growing frustration among US lawmakers with Pakistan in recent years.

The Pakistani government blocked the supply crossings for seven months following US airstrikes that accidentally killed two dozen soldiers on the Afghan border in November 2011. Pakistan finally reopened the routes after the US apologized.

The rift largely led the US to sever most aid to Pakistan for some time, but relations were restored in July 2012. Since then the US has delivered over $1.15 billion in security assistance to Pakistan. Some of the items include advanced communications equipment, roadside bomb jammers, night vision goggles and surveillance aircraft.

Since July 2012, relations between Washington and Islamabad have been improving. Sharif met with President Barack Obama and Hagel in late October in Washington.

The last Pentagon chief to visit Pakistan was Robert Gates in January 2010.