Two people were killed on Tuesday when gunmen opened fire at a university in the Kenyan coastal Kwale county, police and a witness said.
The victims were identified as two female staff members of the Technical University of Mombasa.
Several students, a driver and two policemen were also injured in the shooting.
A witness who did not want to be named told Reuters she and several other students had fled their vehicle when gunmen opened fire on them and had seen blood-covered students being carried from the building as police descended on the campus.
The identity of the gunmen was unclear.
"A bus carrying students of TUM (the Technical University of Mombasa) was ferrying them from their hostels to the campus in Ukunda for classes and was being escorted by a van that had some staff of the college and two escort police officers," a policeman said.
"Armed men numbering about 10 emerged from the bushes and started firing at the van in front. As a result two ladies who are staff of TUM were killed in the van. The driver of the van and two police officers were injured," he said.
Somali terrorist group al Shabaab frequently carries out attacks along the Kenya-Somali border and along the Kenyan coast and in 2015 attacked a university in Kenya's Garissa town, killing 148 students.
On Monday, three people were seriously wounded during opposition demonstrations for changes to Kenya's electoral commission before fresh presidential elections later this month, a witness said Monday.
An Associated Press reporter said he saw one man get shot and by a man in a car who then hit and injured two other protesters before driving away. Riot police watched as the incident unfolded, the witness said. Police are investigating the shooting and hit and run incident, said Nairobi Central chief Harrison Thuku.
The three were wounded as the government's human rights group said at least 37 people were killed by police in three days of protests following the announcement of President Uhuru Kenyatta's re-election in the August vote.
Opposition leader Raila Odinga has called for countrywide protests to urge reforms to the electoral commission ahead of the October 26 rerun of the elections.
The Supreme Court nullified President Uhuru Kenyatta's August re-election citing illegalities in the August 8 vote and the electoral commission's refusal to allow scrutiny of its computer system.
Justices said that by failing to allow the investigation of the computers the commission failed to disprove Odinga's claim that hackers infiltrated the servers and altered the vote in favor of Kenyatta.
Human rights groups have accused Kenyatta of using security agents to suppress opposition demonstrations.