Officials have agreed the remains of inmates on a former prison site will be exhumed and given a Christian burial ahead of a planned development.
Permission was granted in February last year for developer City and County to turn Dorchester Prison into 185 homes.
It is believed Martha Brown, the last woman to be hanged in Dorset, is among former inmates buried at the site.
Oscar-winning screenwriter Julian Fellowes previously led calls for all bodies at the site to be exhumed.
City and Country has still not confirmed how many burial plots it plans to excavate but said those that are exhumed would be moved to Poundbury Cemetery, in agreement with Dorchester Town Council and the Diocese of Salisbury.
The Bishop of Salisbury will now produce an official order "to remove the legal effects of the consecration so that the burials can be sensitively exhumed and presented for reburial", the developer said.
A spokesman for the diocese said any recovered bodies would be given "a proper Christian reinternment".
The developer previously agreed any remains at risk of being disturbed should be exhumed.
It is not known exactly how many bodies lie within or outside of the prison's consecrated burial ground at sites identified in 2015.
However, both the council and Cotswold Archaeology, which is carrying out the archaeological works, said there were likely to be "a lot less" than initially thought.
A number of public executions took place at the site, including that of Martha Brown - who was hanged in 1856 for the murder of her abusive husband.
Her execution was witnessed by the author Thomas Hardy and was said to have inspired his novel Tess of the d'Urbervilles.
Lord Fellowes, president of the Thomas Hardy Society and creator of Downton Abbey, previously said it would be "very disrespectful" not to exhume all bodies at the site.