At a joint press conference with Kenyan president Uhuru Kenyatta, Mrs May said: "This afternoon, we have signed a new compact that will see us expand our joint work on security even further.
"The UK is no longer just training our own military in Kenya, but training with Kenyans to promote stability in east Africa and beyond.
"And to build the continent's capacity to overcome its own challenges and to deliver its own security."
The Prime Minister visited a minefield training area, called the Mine/Uxos Demo Theatre, to watch a demonstration of how an improvised explosive device is disarmed.
During her visit to the Humanitarian Peace Support School, the PM looked on as a soldier lying on his front moved sand away to find the test device.
Mrs May later met British troops who help train Kenyan soldiers.
Mrs May earlier said: "This is a partnership for opportunity but it's also a partnership for our shared security and stability.
"Today we discussed the work we are doing together to make both of our countries and the world more secure."
Yesterday, Mrs May signed a deal in Nigeria to provide cash and a training package, designed to boost efforts to target Islamist extremists in West Africa.
The deal included training to counter improvised explosive devices, £13 million to educate 100,000 children living in areas of conflict, developing the Nigerian government's procedures to respond to terror attacks.
The UK will also train Nigerian army units before deployment.