The Ottoman government moved Bahaullah through a series of exiles, from Iran to Baghdad, then to Istanbul and Edirne, and in 1868 to Akka, which was then a penal colony with a reputation for foul air and disease. He arrived with some seventy followers and members of his household, and they were confined in the citadel barracks under guard. His son Mirza Mihdi died there in 1870 after falling through a skylight while pacing the roof at prayer, and Bahai accounts record his father's offer of that death for the opening of the gates, which is how the community reads the easing of the confinement that followed.
The family was moved into houses within the city and later, as restrictions relaxed further, to a mansion at Bahji on the plain outside it. Bahaullah wrote continuously through these years. The Kitab-i-Aqdas, the book of laws that governs Bahai obligation, was written in Akka in the early 1870s, along with tablets addressed to the rulers of Europe and to the world's religious leaders.
He died at Bahji in 1892 and was buried in a house beside the mansion. That room is the holiest place in the Bahai Faith and the point Bahais turn towards when saying the obligatory prayer, so the direction of prayer for a worldwide religion is fixed on a small building outside a provincial port. The shrine and its gardens, together with the associated places in Acre and in Haifa, were inscribed on the World Heritage list in 2008, the first modern religious tradition's sites to be listed.