Thousands of people in Kuwait have taken part in a mass funeral procession for 27 people killed in a suicide bombing that targeted a Shia mosque on Friday.

A day of mourning was declared in Kuwait on Saturday following the attack on the Imam Sadiq mosque in the district of Sawaber, in the eastern part of Kuwait City.

Police said they were questioning a number of suspects with possible links to the suicide bombing.

The owner of the car that drove the bomber has been arrested and a search is under way for the driver, Kuwait's state news agency reported on Saturday.

The Islamic State of Iraq and the Levant (ISIL) group claimed responsibility for the bombing, which was Kuwait's worst attack in years and the first on a Shia mosque.

Documenting life under ISIL

In a message posted on a Twitter account known to belong to the group, ISIL claimed the blast was the work of a bomber wearing an explosive vest.

On Saturday, thousands of Sunnis and Shia from across the country took part in the victims' funeral procession and prayer at Kuwait's Grand Mosque.

Many carried the Kuwaiti flag; others a simple black flag to signify mourning. 

Friday's attack prompted the Kuwaiti cabinet to announce after an emergency meeting that all security agencies and police had been placed on alert to confront what it called "black terror".

"The cabinet stresses that it will take whatever measures necessary to root out this scourge, and declares a relentless all-out confrontation with these terrorists," it said in a statement.

Kuwait's Emir Sabah al-Ahmad Al-Sabah visited the mosque, located just a few buildings away from the country's interior ministry, following the attack.

He 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," Sabah said.

ISIL targeted Shia mosques in neighbouring Saudi Arabia on two consecutive Fridays in May.

Clouds of smoke

Video footage from the scene showed several bodies on the floor of the mosque amid debris and clouds of heavy smoke.

Sheikh Mohammed Abdullah al-Mubarak al-Sabah, a Kuwaiti government spokesperson, said that despite security forces having been equipped with the latest technology, attacks such as the one that occurred on Friday were very hard to stop.

"We will be investing in metal detectors and the like but even that can be overcome with the use of different types of technologies," he told Al Jazeera.

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

Al Jazeera's Mohammed Jamjoom, reporting from Kuwait City, said "the shock of yesterday's attack will be something it will take a long time for Kuwaitis to get over".

"This is a country where they say Sunni and Shia live harmoniously and they will continue to do so," he said.

"In Kuwait, nobody could have anticipated this. That's why the people are so worried."

Source: Al Jazeera and agencies