By Ahmed Hagagy

KUWAIT (Reuters) - A suicide bomber killed 27 people when he blew himself up inside a packed Shi'ite Muslim mosque in Kuwait city during Friday prayers, the health ministry and witnesses said, the first attack of its kind in the major oil-exporting state.

The Islamic State militant group claimed responsibility for the attack, which also wounded 227 people according to the interior ministry, in the district of Sawaber in the eastern part of the Kuwaiti capital.

Parliament member Khalil al-Salih, who was at the mosque when the attack occurred, said worshippers were kneeling in prayer when the bomber walked into the Imam al-Sadeq Mosque and detonated his explosives, destroying walls and the ceiling.

"It was obvious from the suicide bomber's body that he was young. He walked into the prayer hall during sujood (kneeling in prayer). He looked ...in his 20s, I saw him with my own eyes," he told Reuters by telephone.

"The explosion was really hard. The ceiling and wall got destroyed," he said, adding that more than 2,000 people from the Shi'ite Ja'afari sect were praying at the mosque.

The mosque preacher was quoted by state news agency KUNA as saying that the attack targeted worshippers at the back of the mosque, towards the end of the Friday prayers.

It was the first suicide bombing at a Shi'ite mosque in Kuwait and worst militant attack in the country for many years.

Shi'ites comprise between 15 and 30 percent of the predominantly Sunni Muslim Gulf Arab state, where members of both communities are known to live side by side with little apparent friction.

Security forces quickly sealed off the perimeter of the mosque while rescue workers carried the wounded to hospital.

Kuwait National Petroleum Company (KNPC) spokesman Khaled al-Asousi told Reuters that the company was carrying out "extra monitoring and searches" to boost security around oil facilities after the attack.

Islamic State named the bomber as Abu Suleiman al-Muwahed and said in a statement posted on social media that he had targeted a "temple of the rejectionists" -- a term it generally uses to refer to Shi'ites, whom it regards as heretics.

Story continues

Islamic State had urged its followers on Tuesday to step up attacks during the Ramadan fasting month against Christians, Shi'ites and Sunni Muslims fighting with a U.S.-led coalition against the ultra-hardline jihadist group.

Also on Friday, a gunman killed 37 people including Western tourists at a beach resort in Tunisia, and in France a decapitated body covered in Arabic writing was found after an attacker rammed his car into a gas container, triggering an explosion.

There was no evidence the three attacks were deliberately coordinated. But coming so close together on the same day in three countries on three different continents, they underscored the far-reaching, fast-growing influence of Islamic State, Western politicians said.

BLOOD DONATIONS

The Health Ministry said Kuwait's blood bank had opened additional centers to receive blood donations and it urged citizens with non-urgent medical needs to avoid the emergency units.

Pictures posted on social media and Kuwaiti news websites showed men in traditional white robes smeared with blood outside the mosque. A second photo showed a row of victims wrapped in white body bags and a third the collapsed ceiling of the mosque.

Kuwait declared Saturday a day of mourning.

Emir Sheikh Sabah al-Ahmed al-Sabah, who visited the damaged mosque after the attack, said the bombing violated the sanctity of the Muslim holy month of Ramadan as well as Islamic law forbidding the shedding of the blood of innocents.

"National unity is a protective fence for the security of the nation," Sheikh Sabah said.

Prime Minister Sheikh Jaber al-Mubarak al-Sabah, who visited the wounded at the Emiri Hospital, also condemned the bombing as an attempt to jeopardize Kuwait's national unity.

"This incident targets our internal front, our national unity," Sheikh Jaber told Reuters outside the hospital. "But this is too difficult for them and we are much stronger than that."

Islamic State has recently twice targeted Shi'ite mosques in neighboring Saudi Arabia and carried out attacks against members of the sect's Zaydi branch in Yemen.

Kuwait recently approved legislation allowing for security cameras to be placed at public places.

Yaqoub Al-Sanea, the minister of justice, religious endowments and Islamic affairs, said that despite Friday's attack, "Kuwait will remain an oasis of security for all groups of Kuwaiti society and all sects. The government is taking many procedures to protect prayers and mosques."

(Additional reporting by Hadeel al-Sayegh and Omar Fahmy; Writing by Sami Aboudi; Editing by William Maclean, Mark Heinrich and Andrew Hay)