Budding scientists and mathematicians may be better off heading to the United States or Asia to study for a degree as the UK is lagging behind in these subjects, according to new international rankings.

UK universities are facing increasingly stiffer competition from other nations in science, technology, engineering and maths (STEM) disciplines, it suggests.

But those students planning on careers in areas such as geography, history, English and modern languages should look at studying at Oxford or Cambridge, which are considered the best in the world for these disciplines.

The latest annual QS World University Rankings by Subject shows that globally, Oxford is the UK's best performing institution.

It took first place in three subjects - English language and literature, modern languages and geography. This means it was rated number one more than any other university in the world except Harvard and the Massachusetts Institute of Technology (MIT), both in the US.

Harvard was ranked number one in 11 subjects and MIT in nine. Cambridge was ranked first globally in one subject - history.

While the UK is still performing strongly in the arts and humanities, the findings suggest, it is falling behind in maths and science.

Of the 10 subjects with the most UK universities in the top 200 - those 200 institutions that are considered the best places to study the discipline - just two were STEM-related. These were psychology and environmental science.

And the 10 disciplines that had the fewest UK institutions in the top 200 were all science and maths based subjects. These were agriculture, chemical engineering, mathematics, electrical engineering, computer science, physics, materials science, pharmacy, chemistry and earth and marine science. The top universities for these subjects globally were all institutions in the US.

An analysis of the rankings also found that 19 of the top 50 universities for geography and 15 for English language and literature were in the UK, but only three for civil engineering, less than Hong Kong and Australia.

In total, Asia had 10 of the top 30 institutions in the areas of chemical, civil and electrical engineering and eight for mechanical engineering.

QS head of research Ben Sowter said: "The UK remains second only to the US, but it now faces far stiffer competition in the STEM disciplines.

"The leading Asian institutions can now be considered serious global players, particularly in the fields of science and technology."

The QS rankings rated universities worldwide in 30 different subject disciplines, based on the opinions of academics and employers.

The results also looked at the UK's national picture and found that on this measure, Cambridge outperformed Oxford.

Only looking at UK institutions, Cambridge was ranked first nationally in 14 subject areas, while Oxford was top in 10.

The London School of Economics was first for sociology, economics and communication and media studies, Edinburgh was top for linguistics, Reading for agriculture and the Institute of Education was first for education.