Theresa May will set a condition that the UK ensure its overseas aid spending matches “wider national security priorities” as well as tackling poverty, in a speech due to be delivered in Cape Town as she begins a three-day trip to Africa.

The prime minister will recommit to maintaining the aid budget at 0.7% of gross national income (GNI), a pledge David Cameron originally made, but will seek to deflect criticism of the level of spending by the right of the Conservative party by saying it has to have a wider political and security purpose.

“I am unashamed about the need to ensure that our aid programme works for the UK. So today I am committing that our development spending will not only combat extreme poverty, but at the same time tackle global challenges and support our own national interest,” May will say on Tuesday. “This will ensure that our investment in aid benefits us all, and is fully aligned with our wider national security priorities.”

Hitting the 0.7% aid target was a priority for Cameron to demonstrate his liberal credentials, but it has long been criticised by many on the right of the Tory party, which has repeatedly questioned the level of spending and argued that a proportion of the money should be spent elsewhere.

Although the 0.7% level has been a UN target since 1970, the UK was the first G7 country to hit it in 2013. As a proportion of GNI, Britain is the sixth highest spender in the world, according to figures complied by the OECD.

May is the first prime minister to visit sub-Saharan African since Cameron attended the funeral of Nelson Mandela in 2013. She will meet the South African president, Cyril Ramaphosa, on Tuesday before heading to Nigeria and Kenya to meet presidents Muhammadu Buhari and Uhuru Kenyatta.

May will set a target for the UK to become the leading G7 business investor in Africa by 2022 as she seeks to promote a post-Brexit agenda. The prime minister wants the private sector to step up its involvement, calling on Britain to overhaul US investment and stay ahead of France, which under its president, Emmanuel Macron, has sought to build its own position in Africa.

Setting the new target, May will say: “By 2022, I want the UK to be the G7’s number-one investor in Africa, with Britain’s private sector companies taking the lead.

“The challenges facing Africa are not Africa’s alone. It is in the world’s interest to see that those jobs are created, to tackle the causes and symptoms of extremism and instability, to deal with migration flows and to encourage clean growth.”

The prime minister is taking a 28-strong trade delegation with her on her trip, and will emphasise Britain’s position in finance, infrastructure and professional services. Among those traveling with May are the executives of the London Stock Exchange and Standard Chartered, the emerging markets bank.

May will say she wants “to put our development budget and expertise” to support the investment approach because the “private sector has not yet managed to deliver the level of job creation and investment that many African nations need”.

During her trip, May will discuss security cooperation with Buhari and in particular with Kenyatta. She will see British soldiers training Kenyan and other military personnel in the region and dealing with improvised explosive devices made by al-Shabaab in Somalia.

The PM’s speech will also include a warning of what could happen if economic development in Africa fails to progress. She will highlight “the human impacts” ranging from “a loss of faith in free markets and democracy as the best way to secure global growth and human rights, to greater conflict and an increased susceptibility to extremism”.

• This article was amended on 30 August 2018. An earlier version referred to the UN’s target for international aid spending as “0.7% of GDP”. That meant to say of gross national income (GNI). In addition, the article said that in 2013, the UK was the first country to hit that level. The UK was the first G7 country to hit that level.