Mercury has bought a 12.7% stake in Datagrid NZ for US$30m.