Tutankhamen, Richard III, Louis XVI — throughout history, the deaths of monarchs have set off wars, revolutions and writing careers. Now, the passing of the last of the imperial Ottoman Turks has led to a battle over the rent-controlled apartment of an Afghan princess on the Upper East Side.

In 1945, Ertogroul Osman moved into a two-bedroom walk-up apartment on the top floor of a three-story commercial building on Lexington Avenue south of 74th Street. Though it had a handsome mansard roof at the time and a prime uptown location, the stout 34-foot-wide property was practically a hovel compared with the 124-acre Yildiz Palace in old Constantinople where Mr. Osman was born and where his grandfather Abdul Hamid II ruled from 1876 to 1909. Had the empire not been dissolved, Mr. Osman would have taken the throne in 1994.

Instead he spent 64 years in the same apartment until he died in 2009 on a trip to Istanbul with his second wife, Her Imperial Highness Zeynep Osman, who had joined him on Lexington Avenue after their marriage in 1991. Like her husband, Princess Zeynep’s royal family had had to flee its home in Afghanistan in the 1920s.

Now Zeynep, an Istanbul native, fears she may be forced out of her New York home.

After her building was sold in 2011 for $10.1 million, her new landlord, Avi Dishi, paid a visit to the 1,600-square-foot apartment that October.