The UK is to build a cyber centre in Nairobi to help Kenyan police stop child abuse images being shared online.
It will also assist efforts to identify potential victims and access data from tech firms to catch offenders.
Mrs May is the first British prime minister since Margaret Thatcher in 1988 to visit the country.
She is meeting president Uhuru Kenyatta and seeing British soldiers who are training troops from Kenya and other African countries fighting Islamist militant group al-Shabab in Somalia.
At a joint press conference, the prime minister announced a wide-ranging new security pact between the two countries, including funding for enhanced airport security in the former British colony.
The UK also offered support to Kenyan police in dealing with violence against girls and women, plus legal expertise on pursuing complex terror and organised crime cases.
The cyber centre project is linked to Kenya’s existing anti-human trafficking and child protection unit, which was set up in 2016 with input from the UK’s National Crime Agency.
This unit has helped protect around 499 children since March 2016 and helped secure convictions of British paedophiles who have sexually abused children in Kenya.
“Online child exploitation is an abhorrent crime and we are determined to ensure there is no place to hide for predators who use the internet to share images of abuse across borders, too often with impunity,” Mrs May said ahead of her arrival in the Kenyan capital.
The prime minister is on the final leg of a three-country tour, which has seen her visit South Africa and Nigeria in an effort to maximise trade opportunities after the UK leaves the EU next year.
— BBC News (UK) (@BBCNews) August 30, 2018
BBC political correspondent Ben Wright said there was no talk of a “no-deal Brexit” at the press conference – and that President Kenyatta had said he wanted continuity and guarantees that tariff-free access to the UK would continue.
Mr May stressed that the UK was “committed to a smooth transition that ensures continuing in our trading relationship with Kenya” and that “duty-free, quota-free” access to British markets would continue.
“We are pursuing, of course, a good deal for trade with the EU once we have left the EU. But we will be looking to enhance our trade relationships around the rest of the world as well.”
She also pledged that any assets acquired from corruption in Kenya and hidden in the UK, would be sent back: “Today we signed an agreement to ensure that any proceeds of corruption that end up in the UK will be given back to the people of Kenya.”
She has announced £4bn of extra financial support for African economies, linked to a refocusing of the UK’s aid spending, while promising support to Nigeria to confront violent Islamist extremism and human trafficking.
She also said she wanted the UK to overtake the US to become the G7’s biggest investor in Africa by 2022 and struck Britain’s first post-Brexit trade pact with Mozambique and the Southern African Customs Union.
Mrs May’s trip finishes on Thursday with a state dinner hosted by Mr Kenyatta.
He has told the BBC’s Hardtalk programme that all public servants, including himself, will be audited to show the origin of their wealth.
The UK and Kenya
Kenya re-exports some of its products to the EU through the UK and there are concerns that a hard Brexit might jeopardise that.
Kenya’s trade split between the UK and the rest of the EU “is almost 50-50 and the country will have to strike a good deal with both the UK and the EU because it depends on both markets to sell its tea, fresh produce and other agricultural products,” says economist Tony Watima.
Kenya supplies more roses to the European Union than any other country and is the world’s third largest exporter of cut flowers.
The country sends 17% of its flowers sold in the EU to the UK. With 500,000 people supported by the flower industry, according to the Kenya Flower Council, every market is critical.
But with direct flights from Nairobi to New York beginning in October, the country may be looking to tap into the larger US market for its goods.