Defense Secretary Chuck Hagel warned Pakistani leaders Monday 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 U.S. to stop the shipments from Torkham Gate through Karachi 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, according to the officials who spoke to reporters on condition of anonymity.

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

After leaving Islamabad, Hagel flew to Saudi Arabia, where he is meeting with Crown Prince Salman, and then to Qatar, where he will speak to troops today.

Some of the more contentious issues were raised during the Pakistan meetings, including Islamabad’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 U.S. 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 U.S. drone strikes, “stressing that drone strikes were counter-productive to our efforts to combat terrorism and extremism on an enduring basis,” the statement said.

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 U.S. lawmakers with Pakistan in recent years.

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

The rift largely led the U.S. to sever most aid to Pakistan for some time, but relations were restored in July 2012. Since then the U.S. has delivered more than $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.