The plot is based on Leo Tolstoy's 1911 posthumously published short story "Father Sergius". The court of Czar Nicholas I of Russia is replaced by that of Charles III of Spain when he was still Charles VII of Naples. All of the original Russian locations are replaced by ones in southern Italy.