KUWAIT (Reuters) - Kuwaiti lawmakers endorsed a legal amendment on Thursday which could make insulting God and the Prophet Mohammad by Muslims punishable by death, in a second reading that brings the proposal a step closer to passing.

The plan still needs approval by Kuwait's ruler before it becomes law and follows a high-profile case of suspected blasphemy on Twitter which caused an uproar in the Gulf state.

The draft now includes a new clause which will mean the death penalty will only be applied if the person stands by their actions when questioned by a judge.

This would give defendants the opportunity to repent and face a prison term or a fine instead.

The amendment, which would apply the death penalty only for Muslims, was backed by 40 members of parliament, while six opposed it - slightly more than in the previous reading.

Around 85 percent of Kuwait's inhabitants are thought to be Muslim. Expatriate Christians and Hindus are the next largest groups.

Blasphemy is illegal under Kuwait's publications law and under the penal code as slander or libel. At present it carries a jail term, the length of which depends on the severity of the comments and their perceived effect on society, lawyers say.

Islamist MPs proposed toughening the law in March after authorities arrested a Kuwaiti man they said had defamed the Prophet, his companions and his wife on the Twitter messaging site.

The man, identified by his lawyer as Hamad al-Naqi, has told police his account was hacked. He is now in pre-trial detention.

Dozens of Sunni activists protested to condemn Naqi, who is from Kuwait's Shi'ite Muslim minority.

Other countries which have used the death penalty in blasphemy cases include Kuwait's neighbor Saudi Arabia and Pakistan, according to Amnesty International.

(Reporting by Mahmoud Harby, Writing by Sylvia Westall; editing by Sami Aboudi)