U.S. Secretary of Defense Chuck Hagel (R) arrives on a C17 Military aircraft, on December 7, 2013 in Kabul, Afghanistan.

Story highlights

Hagel visiting troops in Afghanistan

Defense secretary gets assurances

Karzai visiting Iran on Sunday

CNN  — 

U.S. Defense Secretary Chuck Hagel says his Afghan counterpart assured him that an important security pact will be reached with Kabul in a “timely manner,” despite a failure so far to forge a deal.

Hagel made the remark during a visit to Afghanistan on Saturday. What is known as the bilateral security agreement – ready to be implemented but still unsigned – initially has been front and center in Hagel’s visit.

Hagel met with Afghanistan’s officials, including the country’s defense minister, as Washington works to get Afghanistan to ink a bilateral security agreement to keep some U.S. and other coalition troops in the country after next year.

The Defense secretary said that from what he has heard in his discussions with Afghan ministers, they believe it’s in the country’s interest to have such an agreement – which lays out the U.S. military presence in Afghanistan after 2014, when the NATO-led force of some 80,000 troops is scheduled to leave.

“The minister of defense assured me that the BSA would be signed and would be signed in a very timely manner,” Hagel said, making reference to Defense Minister Bismullah Khan Mohammadi.

But failure to forge a security pact with Afghan President Hamid Karzai has generated growing consternation among U.S. officials.

The security agreement itself has been endorsed by the Afghan council of tribal leaders, called the loya jirga, but Karzai said he won’t sign it until after the country’s elections in April and until certain conditions are met.

These conditions include an end to U.S. raids on Afghan homes and the release of Afghan prisoners from the Guantanamo Bay detention center.

Washington has resisted such changes, saying Karzai’s demands are new provisions added to a deal that was already reached.

Hagel said he hadn’t planned to meet with Karzai and played down the significance of being in Afghanistan and not meeting with the president.

He said the trip had been planned for weeks and its purpose was visiting troops and meeting with Afghan commanders to assess their progress.

And, he told reporters, there have been many discussions at the political level with Karzai during recent visits by other others, such as Secretary of State John Kerry.

Hagel emphasized the importance of the loya jirga’s decision and said “we are planning for a post-2014 presence here.”

But he said NATO – which commands the multination International Security Assistance Force in Afghanistan – will eventually need clarity on the security agreement’s status so it can properly plan its work in the country.

NATO warned it may be forced to withdraw all of its troops from Afghanistan by the end of next year if Karzai doesn’t sign a security agreement with the United States.

Karzai, meanwhile, is scheduled to make a visit to Iran on Sunday. Iran’s semi-official Mehr News said Karzai will be meeting with Iranian President Hassan Rouhani.

According to state-run Press TV, an Iranian Foreign Ministry spokeswoman said Tehran doesn’t believe the security agreement will benefit the Afghan government and nation.

Marzieh Afkham said Tehran’s position is that the security pact is not “useful for the long-term expedience and interests of Afghanistan.” and could have a negative impact on regional issues.

READ: Opinion: Be patient, the Afghans are fed up with Karzai

READ: Opinion: Hopes are dim for Afghanistan

READ: Where is the world’s most corrupt nation?

CNN’s Jamie Crawford, Joe Sterling, and Reza Sayah contributed to this report