The death toll from an attack by al-Shabab militants on a university in the town of Garissa in eastern Kenya has risen to 147, Kenyan government officials say.

The officials said that security forces killed all the four attackers who had taken hundreds of students hostage at the Garissa University College campus on Thursday.

The officials added that 587 students had been rescued, and 79 of them were injured during the rescue operation.

Local sources say security has been extremely beefed up in the region and all communications and mobile networks have been cut off. The government has also ordered a night curfew in the town and nearby cities.

Early on Thursday, the gunmen stormed the campus, located some 150 kilometers (90 miles) from the border with Somalia.

Paramedics attend to an injured man as he is wheeled into Kenyatta National Hospital in Nairobi following an attack at Garissa University College, April 2, 2015.

Somalia-based al-Shabab militants claimed responsibility for the attack, saying it was carried out in revenge for Kenya’s military operations in Somalia.

“Kenya is at war with Somalia… our people are still there, they are fighting and their mission is to kill those who are against the Shebab,” Ali Mohamud Rage, a spokesman for the militant group, said.

Kenya’s northern and eastern regions, which border Somalia, have been the scene of violent attacks blamed on al-Shabab militants from Somalia.

Kenya currently has over 3,000 soldiers stationed in southern Somalia, where they have been battling al-Shabab. The country sent troops into Somalia in late 2011 after the militant group carried out a series of raids inside Kenya.

The al-Shabab militants have been pushed out of the Somali capital, Mogadishu, and other major cities in the country by the African Union Mission in Somalia, which is largely made up of troops from Kenya, Ethiopia, Uganda, Burundi, Djibouti and Sierra Leone.

DB/HJL/MHB