By Mirwais Harooni

KABUL (Reuters) - Afghan President Hamid Karzai said on Thursday his government was pressing to end divisive NATO night raids in negotiations with the United States on a long-term strategic pact, saying some past operations had violated Afghan sovereignty.

The increasingly assertive Afghan leader's admonition came as U.S. and Afghan officials try to agree on a framework for some American troops and advisers to stay in the country beyond a 2014 deadline for most NATO combat forces to withdraw.

Both countries recently agreed to transfer a U.S.-run prison to Afghan authority. The final sticking point is Western military raids on Afghan homes at night, which both infuriate Afghans and damage Karzai's popularity.

"The fight against terrorism in our country has led to some activities which are against our national sovereignty. We are about to solve it entirely," Karzai told a graduation ceremony of Afghan army cadets in the capital, Kabul.

"The issue of prisons, imprisonment and keeping prisoners is over. We are working now to halt night raids in Afghan houses. The security of Afghanistan must be provided by the sons of Afghanistan, according to the constitution," he said.

Afghanistan's constitution requires a judge to approve searches by security forces.

Karzai said his government had presented the Americans with a list of demands in negotiations and U.S. officials had their own conditions, understood to include the ability to carry out unilateral operations against al Qaeda militant units.

Afghanistan would need about $4.1 billion from the United States and other international backers to fund the 350,000-strong security forces in the decade beyond 2014, he said. He also called for the supply of weapons, aircraft and radars.

The United States said on Wednesday it seemed to be on track to sign the partnership agreement with Afghanistan, which will chart their ties, before or during a late May summit.

TIES STRAINED

This week, Karzai appeared to have won a major concession from Washington following a deadly shooting spree by a U.S. soldier, with the Obama administration considering curbs on night raids including judicial veto.

The U.S. government was discussing options with the Afghans including a warrant-based approach or possibly allowing Afghan judges to review raids before they took place, a U.S. official said on Monday.

Nearly 11 years after the Taliban government was toppled, the United States and its allies face a resilient insurgency, a weak Afghan government, and an uncertain future for Western support after the end of 2014 pullout.

At a summit in Chicago in late May, NATO nations are expected to outline their path out of the war and agree on backing for Afghan security forces.

U.S.-Afghan relations have been badly strained by a March 11 incident in which a U.S. soldier is suspected of killing 16 Afghan civilians, and by the burning of copies of the Koran at NATO's main base in the country last month.

General John Allen, who commands U.S. and NATO forces in Afghanistan, said on Tuesday he would present recommendations for Obama on troop levels in 2013 and beyond during the last three months of this year.

A decision late in the year would allow U.S. commanders to size up the strength of the Taliban after the traditional summer fighting season and allow more time to see whether nascent peace talks take hold.

In a blow to NATO hopes of a negotiated end to the war, the Afghan Taliban said last week that they were suspending talks with the United States.

The U.S. government, however, has said it remained committed to political reconciliation involving talks with the Taliban but progress would require agreement between the Afghan government and the insurgents.

(Writing by Jack Kimball; Editing by Rob Taylor and Robert Birsel)