Malaysia's king has approved the appointment of an ethnic Indian lawyer as the new attorney general, amid protests from Islamic groups that the job must be held by a Muslim.

A palace statement says Sultan Muhammad V has approved terminating current Attorney General Mohamad Apandi Ali and replacing him with Tommy Thomas, the first minority to hold the post in 55 years.

Groups representing ethnic Malays, who make up two-thirds of Malaysia's 31 million people, have demanded the top legal job be given to a Muslim to protect the status of Islam as the official religion.

The statement Tuesday said the king urged all Malaysians to ensure Thomas' appointment doesn't "create religious or racial conflict as every Malaysian should be treated fairly regardless of race and religion."