Theresa May promised that a refocused UK overseas aid programme would go beyond protecting vulnerable people to crack down on illegal migration and organised crime and to support fragile countries in Africa as she detailed her plans to reprioritise development spending.

The prime minister spelled out how she hoped to change Britain’s aid priorities during a speech on Tuesday in Cape Town. She said she wanted the UK to do more to help West African countries such as Mali, Chad and Niger which have been “waging a battle against terrorism”.

May said she was talking about a new strategic approach to development which amounted to “not just what we can do to help the most vulnerable people across the world and help lifting people out of poverty, but how can we ensure there is a long, longer term element by working with governments and others to ensure good government in stability in those fragile states”.

The prime minister, who is on a three-day trip to Africa, said she wanted Britain to use its aid programme “to support a major new crack down on illicit finance and organised crime, deploying expertise in financial centres around the world” – and to counter “illegal migration, modern slavery and trafficking in people”.

Her speech came a day after she signalled that while the UK remained committed to spending 0.7% of its GDP on overseas aid, its priorities would be refocused to counter political and terrorist threats. The UK is one of the heaviest spenders on overseas aid, much to the chagrin of the Conservative right, which argues the money would be better spent domestically.

May willvisit Nigeria and Kenya after South Africa, but she has faced criticism for being the first UK prime minister to visit the continent for five years, after David Cameron attended the funeral of Nelson Mandela in 2013. She said she was looking forward to a greater engagement with Africa. “What I’m talking about today is a new partnership for the future recognising the challenges that we both face.”

She also said the UK should become the largest G7 investor in Africa by 2022. Doing so would mean the UK overtaking the US and staying ahead of France which under its president, Emmanuel Macron, has made investing in Africa a strategic goal.

Development charities sounded a note of caution about May’s proposals. Mark Goldring, the chief executive of Oxfam GB, said: “It’s an uncomfortable fact that extreme levels of poverty are increasing in the countries she is visiting despite recent economic growth. It is therefore vital that the UK promotes growth that supports the world’s poorest first and foremost, and that UK trade interests don’t inadvertently increase inequality.”

The UK also announced it had signed an agreement in principle to roll over EU trading arrangements with South Africa and other southern African countries after Brexit. It represents the first of 40 international trade agreements that the UK has confirmed it would continue after Brexit.