Highland councillors have granted planning permission for the new Inverness Justice Centre.
The Scottish Courts and Tribunals Service (SCTS) has proposed building it on a site between the city's Longman Road and Burnett Road.
The centre would allow the courts service to move out of Inverness Castle, and the castle to be turned into a tourist attraction.
Councillors have given the project full planning permission.
The centre was given planning permission previously, but the design has since been "improved" to create what SCTS describes as a "landmark building".
Construction is scheduled to begin in November this year and the main building work could be completed in 2019.
The centre will be built on the site of a former bus depot next to Police Scotland's Highlands headquarters.
Eric McQueen, SCTS chief executive said: "Rather than simply a replacement sheriff court building, the justice centre will play a pivotal role in changing victims', witnesses' and offenders' experience of the justice system, while providing high-quality secure criminal courts, and flexible accommodation for our civil courts and tribunal users.
"By bringing together the right organisations, we can all focus on problem-solving approaches to reduce reoffending and increase the opportunity for community sentencing."
Mr McQueen said the centre's facilities would remove the need for children to appear in court.