When President Hamid Karzai leaves office next year, he will receive a lavish parting gift.
The Afghan government is restoring an old palace, once occupied by the monarchy, for Karzai to live in rent-free. What's more, the departing president will also receive a generous lifetime government pension.
The 55-year-old Karzai, the only president the country has known since a UN-backed deal installed him in late 2001, is stepping down after April's presidential election. Under the Afghan Constitution, he cannot seek a third term in office.
Karzai's new 1,200-square-meter residence will be located just outside the grounds of the heavily fortified Arg-e Shahi, an 83-acre complex in central Kabul that has served as Karzai's seat of power for more than a decade. The ex-president will live there with his wife and young son and will be provided with a security detail.
The property is protected by high concrete walls and security barricades. Apart from the palace, Karzai's new government-owned residence will include several new buildings and offices previously used by the United Nations, the Afghan National Army, and the country's spy agency.
Most of the land was already in government hands, but some of it was purchased from a private owner to make way for the renovation.
Karzai spokesman Aimal Faizi has said the project began in early August and is expected to be completed early next year. He did not reveal any further details, including the price tag.
The project has drawn strong reactions from Afghans, many of whom see the departing president as a corrupt and inefficient leader.
"If he had served the Afghan people well, he wouldn't have to hide in a fortified palace," Agha Shirin, a Kabul resident, writes in a post on the social-networking site Facebook. "He could live safely among the people."
Arguing that Karzai has "united all the criminals under him and he has put all the money intended for Afghan people into his own pocket," Basir Javid asks in a Facebook post: "Why should the Afghan people pay for his new home?"
And Facebook user Nasrullah suggests that Karzai's new residence, which is located just a few hundred meters from the presidential palace, might be part of a nefarious plan by the president to maintain his influence after he steps down.
"He only has his own interest at heart. He wants to keep his sway so he can protect himself and his rich and powerful family," Nasrullah writes.
Karzai and his family have been regarded with some suspicion. Ahmad Wali Karzai, a brother who was assassinated in 2011, was accused of involvement in the opium trade and other illegal activities. Brother Mahmud Karzai, meanwhile, has been accused of using his brother's position to build a business empire that has made him one of the country's wealthiest men.
A declaration of President Karzai's assets in 2010 by the High Office for Oversight and Anticorruption, a government body, stated that he had less than $20,000 in the bank and owned no land or property in Afghanistan.
Apart from the keys to a lavish palace, Karzai will also receive a substantial monthly pension. In June, the Afghan parliament agreed to increase the monthly salary for the ex-president to around $17,000, which he will receive for the rest of his life.
Karzai's apparent decision to remain in Afghanistan has surprised many people. Afghanistan has only one surviving former head of state -- ex-President Sibghatullah Mojaddedi -- and he moved to Pakistan after his two months in office in 1992.
Another former president, Burhanuddin Rabbani, was assassinated by a suicide bomber in 2011.
Communist-era President Mohammad Najibullah, who was living at a UN compound in Kabul at the time, was tortured and publicly hanged when the Taliban took control of the capital in 1996.
"Let him stay," Najib Nasrat says of Karzai's plans in a Facebook comment. "But it's going to be at his own peril."