The United States and Afghanistan are expected to sign a deal on the transfer of U.S.-run detention centres to Afghan authorities on Friday, two Afghan officials said, improving the prospects of a strategic partnership allowing long-term U.S. involvement in the country.

The Foreign Ministry later said Afghan Defence Minister Gen. Abdul Rahim Wardak and Gen. John Allen, the commander of U.S. forces in Afghanistan, would sign an MOU.

The Strategic Partnership Agreement, which Washington and Kabul have been discussing for over a year, will be the framework for U.S. involvement in Afghanistan beyond 2014, when the last foreign combat troops are due to leave Afghanistan.

Afghanistan wants the United States and NATO to agree to stop carrying out night raids on Afghan homes as a precondition for signing an agreement with Washington and a timeline to assume control over detention centres.

The Obama administration has been hoping it can conclude an agreement before a meeting of NATO leaders in Chicago in May.

While the document would not nail down details, it is expected to contain an agreement in principle to some sort of long-term U.S. military presence in Afghanistan.

A failure to broker a deal might strain U.S.-Afghan relations and increase the chances of prolonged instability in Afghanistan.

The latest round of talks has been complicated by tensions over the burning of copies of the Muslim holy book at a NATO base, which triggered violent protests and prompted some Afghan security forces to turn their weapons on American soldiers.

(Reporting by Hamid Shalizi; Writing by Michael Georgy; Editing by Nick Macfie)