Islamic State has claimed responsibility for a mosque attack in Kuwait that has left 25 people dead and hundreds injured.

A suicide bomber struck during Friday prayers in what is thought to be the first attack on a Shia mosque in the country.

Kuwait's Prime Minister Sheikh Jaber al-Mubarak al-Sabah has described the bombing as an attempt to undermine unity in the country, where Shia and Sunnis live side-by-side with little apparent friction.

"This incident targets our internal front, our national unity," he said after visiting those wounded in the attack. "But this is too difficult for them and we are much stronger than that."

Police have cordoned off the mosque while it investigates the bombing

Islamic State considers Shia Muslims to be heretics, but Sunni Muslims have used social media to condemn the attack.

Kuwait's leading Sunni cleric, Sheikh Ajeel al-Nashmi, has described the bombing as a "criminal act aimed at sowing seeds of discord, and undoubtedly Shi'ite and Sunnis will foil the terrorists' plot."

Witnesses to the attack say the suicide bomber appeared to be in his 20s.