Thirteen people died just after midnight in Hindi -- near the tourist coast of Lamu -- during an attack under cover of darkness.
Later that night, a police station in Gamba was raided and nine people were killed. One person was injured and another was missing in that attack.
Al-Shabaab Islamist terror group claimed responsibility for both attacks, saying none of its militants was injured.
"We want to warn those people trying to make Kenya ungovernable that they will not succeed," said Kenya's Deputy President, William Ruto.
"It is impossible in the independent Kenya to have criminals and terrorists coming and killing innocent people," he added. "We have given instructions to security officers to ensure the criminals are brought to book alive or dead."