Image caption UK universities scored particularly well for the employability of their graduates

The UK now boasts six of the world's top 20 universities, according to a new global table.

Edinburgh and King's College London have edged into the top 20 of the QS World University rankings.

Cambridge, UCL, Imperial and Oxford all made it into the top 10.

But John O'Leary, of QS, warned that unless the UK puts more funding into higher education its leading position could slip.

Edinburgh rose to 17th place from 21st last year and King's College London to 19th from 26th in 2012.

US domination

The top UK university was Cambridge in third position, behind Massachusetts Institute of Technology at the top of the table and Harvard in second.

University College London (UCL) and Imperial occupied fourth and fifth places, with Oxford in sixth.

Universities in the United States made up the rest of the top 10.

There were eight UK universities in the top 50 and 18 in the top 100, with graduates from Oxford and Cambridge rated as the world's most employable by 27,000 global graduate employers polled for the ranking.

"Clearly the prestige of a UK degree is recognised by employers around the world, and the brand-name value of Oxbridge has so far survived any negative publicity following the tuition fee hikes and student protests," said Ben Sowter, head of research at QS.

However the rankings also suggest that UK universities struggle to keep up with the US when it comes to cutting-edge research.

Of UK universities, only Cambridge made the top 30 for research citations, with UCL, Oxford and Imperial in the top 50.

'Not complacent'

"The UK invests below the OECD average in higher education, so it is unrealistic to expect its universities to continue to punch above their weight indefinitely," said John O'Leary, of the QS global academic advisory board.

"The current success of leading institutions shows how vital it is that the government matches the investments being made by other countries in order to maintain their world-class status."

UCL's new president and provost, Professor Michael Arthur, said the university's high place in the rankings reflected its efforts both in the UK and overseas.

But he said: "As pleasing as it is, rankings success will not divert us from focusing on our core mission of educating and inspiring our students and delivering world class research."

Dr Wendy Piatt of the Russell Group noted that all six UK universities in the top 20 and 17 of the 18 in the top 100 were members of the group.

"Their focus on research excellence and high-quality teaching means the UK performs formidably well against other nations in spite of its size", said Dr Piatt.

However, she warned: "If our universities are to compete in the future they need the government to provide light-touch regulation and continued investment, and to be welcoming to genuine international students.

"It is worth again highlighting that the process of ranking universities is fraught with difficulties and they should not be used alone in judging the quality of an institution."

Universities minister David Willetts said the rankings were "fantastic news for the universities, their academics, and their students, who are some of the most employable in the world - however we are not complacent, and know we must work hard to remain the best".

He added: "Our reforms to undergraduate finance have put universities on a sustainable financial footing and sharpened incentives to deliver a world-class student experience.

"We have protected research funding, encouraging universities to invest in cutting-edge research and we are helping our universities make the most of the growing opportunities globally through our international education strategy."

Top 20 universities

1. Massachusetts Institute of Technology (MIT)

2. Harvard University

3. University of Cambridge

4. University College London (UCL)

5. Imperial College London

6. University of Oxford

7. Stanford University

8. Yale University

9. University of Chicago

10=. California Institute of Technology (Caltech)

10=. Princeton University

12. Eth Zurich (Swiss Federal Institute of Technology)

13. University of Pennsylvania

14. Columbia University

15. Cornell University

16. Johns Hopkins University

17=. University of Edinburgh

17=. University of Toronto

19=. Ecole Polytechnique Fédérale de Lausanne

19=. King's College London