A biodegradable AZ91 magnesium alloy coated with a thin nanostructured hydroxyapatite for improving the corrosion resistance.