ISLAMABAD, Pakistan — Secretary of State John Kerry said Thursday that the United States had made significant headway in its drone campaign and that he hoped the strikes in Pakistan could end shortly.

“I believe that we’re on a good track,” Mr. Kerry said in an interview on Pakistani television. “I think the program will end as we have eliminated most of the threat and continue to eliminate it.”

Asked if the United States had a “timeline” for ending the drone strikes in Pakistan, Mr. Kerry said: “Well, I do. And I think the president has a very real timeline, and we hope it’s going to be very, very soon.” But he did not specify what the timeline was, and a State Department statement issued later said, “Today, the secretary referenced the changes that we expect to take place in that program over the course of time, but there is no exact timeline to provide.”

Mr. Kerry was in Pakistan to strengthen ties, and was meeting with the nation’s new prime minister, Nawaz Sharif, and other members of the Pakistani leadership.