Kenyan President Uhuru Kenyatta appointed Fred Matiang’i as acting interior secretary to replace Joseph Ole Nkaissery, who has died suddenly.

The replacement was named to avoid a vacuum in leadership as the country prepares to hold elections, Kenyatta said in a televised national address in the capital, Nairobi, on Saturday. Nkaissery, 67, died shortly after being admitted to a hospital in Nairobi, the presidency said in a separate statement. 

“This death comes at a critical time in Kenya’s history as we approach a general election,” Kenyatta said. “There shall be no vacuum in securing our country.” Kenya holds presidential and other elections on Aug. 8.