RIYADH, Saudi Arabia (AP) — 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 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. 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 first high ranking U.S. official to meet with the Army chief, who took over at the end of last month.

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

During the Pakistan meetings some of the more contentious issues also were raised, 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 thatdrone 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 U.S. 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 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 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.

Hagel flew to Pakistan from Afghanistan, where he visited U.S. troops but declined to meet with President Hamid Karzai, who has rankled the U.S. by refusing to sign a security agreement before year’s end.