A British man who killed a fellow Muslim because he felt he had disrespected Islam has been sentenced to at least 27 years in prison.

Tanveer Ahmed admitted stabbing and beating shopkeeper Asad Shah to death at his Glasgow convenience store in March.

Prosecutors said Ahmed, 32, told police his actions were motivated by Shah's "disrespect (for) the Quran, the Prophet Muhammad, Allah and faith."

Shah was a member of the Ahmadiyya Muslim community, which differs from mainstream Islam in that it doesn't regard Muhammad as the final prophet.

Ahmed did not know his victim but had seen statements he had posted online.

Judge Rita Rae sentenced Ahmed Tuesday to life with no chance of parole for 27 years. She said he committed a "barbaric" crime and had shown no remorse.