Kenya's president says the country needs new laws to protect it against "the enemy who is in our midst."

Noting that hundreds of Kenyans have been killed in terror attacks over the last year, President Uhuru Kenyatta on Friday defended government plans to pass more stringent security laws.

Critics of the proposed law say it curtails freedoms and that the government is overreaching in its effort to fight terror.

Kenyatta, who spoke Friday at the country's 51st anniversary of its independence from Britain, said that by enhancing Kenyans' right to security, it is also enriching Kenyans' freedoms.

Militants aligned with the Somalia group al-Shabab have launched dozens of attacks in Kenya. Over the past month two major attacks resulted in more than 60 non-Muslim Kenyans being singled out and killed.