DOHA (Reuters) - Countries across the Middle East need to shake up corrupt institutions and reinvigorate stagnant political systems or risk losing the future to militants, US Secretary of State Hillary Clinton said on Thursday. Hillary, wrapping up a five-day tour through the Gulf Arab region, had tough words at a gathering of regional leaders in Qatar, saying too many Middle East governments were not keeping pace with demographic and political changes. Each country of course has its own distinct challenges and each its own achievements. But in too many places in too many ways the regions foundations are sinking into the sand, Clinton said in unusually frank words for an audience that included representatives of major US allies, including oil giant Saudi Arabia and Egypt. Clinton said her trip had revealed many signs of promise for a new and innovative Middle East, citing green energy projects in the United Arab Emirates and politically engaged youth in Yemen as symbols of hope for a new future. But she said the progress was patchy and not enough to save governments in the region, many of which are deeply undemocratic and face rising threats from extremist movements. Those who cling to the status quo may be able to hold back the full impact of their countries problems for a little while, but not forever, Clinton told government, business and civil society groups at a Forum for the Future. If leaders dont offer a positive vision and give young people meaningful ways to contribute, others will fill the vacuum. Extremist elements, terrorist groups and others who prey on desperation and poverty are already out there, appealing for allegiance and competing for influence. Clintons trip took her to the United Arab Emirates, Oman and Qatar as well as Yemen, which is increasingly in focus as a global security risk because it has become home to a resurgent regional wing of Al-Qaeda. Clintons main focus was to consult with key allies on immediate issues such as Irans nuclear programme, which many leaders especially in the Gulf view as a direct threat. But at every stop, Clinton emphasised the need for greater political involvement by civil society groups in a region where a growing majority of people are younger than 30. We all know this region faces serious challenges even beyond the conflicts that dominate the headlines of the day, said Clinton. While some countries have made great strides in governance, in many others people have grown tired of corrupt institutions and a stagnant political order. They are demanding reforms to make their governments more effective, more responsive and more open, she said. Too many leaders in the region are failing to build a future that your young people will believe in, stay for and defend, Clinton added, citing graft as one of the big problems. People know now maybe what they did not know 20 or 30 years ago: that much of a governments wealth is going to a few instead of the many in too many countries, Clinton said.