Microsoft founder Bill Gates has announced funding for innovative agricultural research in Edinburgh.

The philanthropist joined International Development Secretary Penny Mordaunt for an event with staff and students at the University of Edinburgh.

The Bill And Melinda Gates Foundation has funded research into improving livestock health.

And the UK Government has announced funding for crop research and innovation, alongside a cash boost for scientific research into livestock genetics.

The investments are aimed at helping to lift people in developing countries out of hunger and poverty.

The Gates Foundation is providing £40m over five years for the Global Alliance for Livestock Veterinary Medicines (GALVmed).

It is a public-private partnership which develops livestock vaccines, medicines and diagnostics and makes them accessible and affordable to millions of the poorest smallholder farmers across Africa and South Asia.

Mr Gates said: "In short, if you care about the poor, you should care about agriculture.

"And if you care about agriculture, you should care about livestock.

"What that means in this context is helping poor farmers get as much as possible out of their animals."

Mr Gates said he is proud of the work his foundation has done with UK researchers.

To date it has invested more than £1bn in UK research institutions and on Friday he announced an additional £40m to allow GALVmed to continue its work on preventing livestock diseases.

In addition, the UK Government is to provide £90m over three years to international research organisation CGIAR.

The cash will be used to help fund research into the creation of 'super-crops' which are more nutritious and disease resistant.

Ms Mordaunt said: "Unpredictable flooding, plant diseases and drought are threatening the lives and livelihoods of millions of farmers in Africa who struggle to grow enough crops to put food on the table - the urgency of the task is clear.

"That's why UK aid is supporting British scientists to develop new crops that are more productive, more nutritious and more resistant to droughts and flooding, as well as creating new medicines to protect cattle and poultry from devastating disease.

"New ideas, cutting-edge science and innovative partnerships with organisations like the Bill And Melinda Gates Foundation will help Britain create a healthier, more secure and prosperous world for us all."

Ms Mordaunt also announced a £4m boost from the Department for International Development for the Centre for Tropical Livestock Genetics and Health (CTLGH), which is based in both Edinburgh and Nairobi.

The centre, a joint venture by Edinburgh University, Scotland's Rural College and the CGIAR, is carrying out research aimed at improving the health and productivity of livestock in tropical climates.

Meanwhile, the work of Scottish health workers around the world was praised by Mr Gates as he heard about initiatives in Africa.

The billionaire met First Minister Nicola Sturgeon at St Andrews House and was given a presentation on the work being carried out by NHS Scotland staff in Zambia, Ethiopia and Malawi.

He said: "The Scottish Global Health Collaborative is a really smart idea.

"We know from the Ebola outbreak that a health crisis somewhere can soon become a health crisis everywhere.

"Expertise from countries like the UK was critical in containing that outbreak.

"It was great to hear how the experience and ideas that Scottish health workers are bringing back from their work in Africa is being used to improve the health service here in Scotland.

"The contribution being made by participants in the programme will make a significant difference in the lives of the world's poorest."

The First Minister said she is grateful to the nurses, clinicians and engineers who often give up their own time to do "life-changing work" in Malawi, Rwanda, Zambia and Pakistan.

She added: "Scotland is an outward-looking country and we will continue to be good global citizens and play our part in the fight against global poverty, inequality and injustice.

"The Bill and Melinda Gates Foundation have an incredible record of bringing about substantial change in the world's poorest countries, empowering them to improve their life chances in a range of ways, from improving healthcare and combating infectious diseases to increasing access to education.

"It is fantastic that they are interested in hearing about the work that Scotland is also doing."