The UK is falling behind global rivals in international tests taken by 15-year-olds, failing to make the top 20 in maths, reading and science.

England's Education Secretary Michael Gove said since the 1990s, test performances had been "at best stagnant, at worst declining".

Shanghai in China is the top education system in the OECD's Pisa tests.

Within the UK, Scotland outperformed England at maths and reading, but Wales is below average in all subjects.

Mr Gove told MPs that his reforms, such as changing the curriculum, school autonomy and directing financial support towards poorer pupils, were designed to prevent schools in England from "falling further behind".

He highlighted the rapid improvements that had been made in countries such as Poland, Germany and Vietnam.

Shadow Education Secretary Tristram Hunt called on Mr Gove to take some responsibility for the lack of progress and said the results showed that collaboration between schools and teachers was more effective than market forces.

'Extremely sobering'

Graham Stuart, chair of the education select committee, said the results were "extremely sobering" and showed that "we went nowhere" despite massive investment in schools.

But the Pisa results should not be used to "talk down our public education system", said Chris Keates, leader of the NASUWT teachers' union, who argued that high performing countries were those which promoted the professionalism of teachers.

Image copyright Getty Images Image caption The gap between top and bottom of the league table equals six years of learning

In response to the particularly poor results in Wales, Education Minister Huw Lewis said: "Everybody working in and around the Welsh education sector needs to take a long hard look in the mirror."

Sir Michael Barber, chief education adviser for education company Pearson and former Downing Street adviser, said the test result "focuses minds in education ministries around the world like nothing else".

What are the Pisa tests? International tests in maths, reading and science

Tests are taken by 500,000 15 year old pupils in 65 countries and local administrations

They are run every three years by the Organisation for Economic Co-operation and Development

In the UK, more than 12,000 pupils took the tests in 2012 Try the Pisa test yourself Singapore maths method

The Pisa tests - the Programme for International Student Assessment - have become the most influential rankings in international education, based on tests taken by more than 500,000 secondary school pupils.

These measure education standards in Europe, North and South America, Australasia and parts of the Middle East and Asia.

Tunisia was the only African country that participated.

The top places in the rankings are dominated by Asian school systems - although China so far does not participate as a whole country, but is represented by high-performing cities such as Shanghai and Hong Kong.

In the next set of Pisa tests it is expected that a wider range of provinces in China will be entered.

Shanghai's maths score is the equivalent of three years' schooling above the OECD average.

Image copyright Getty Images Image caption Changing places: Vietnam has overtaken the US and UK in education rankings

Singapore, Taiwan, South Korea and Japan are among the highest ranked across all subjects.

The OECD's Andreas Schleicher, in charge of the Pisa tests, has highlighted Vietnam's "star performance".

The South East Asian country has entered the top 10 for science and outperformed many much wealthier western education systems, including the United States.

UK slips in science

The UK has made little progress and remains among the average, middle-ranking countries, in 26th place for maths and 23rd for reading, broadly similar to three years ago.

READING TOP 10 1. Shanghai 570

2. Hong Kong 545

3. Singapore 542

4. Japan 538

5. South Korea 536

6. Finland 524

7. Ireland 523

8. Taiwan 523

9. Canada 523

10. Poland 518 Source: OECD

But the UK has slipped in science from 16th to 21st place.

Although not directly comparable, because there have been different numbers of countries taking part, this marks a sustained decline, with the UK having ranked 4th in the tests taken in 2000.

Much of this falling behind has been caused by other countries improving more quickly.

The OECD figures show that there has been almost no change in the UK's test scores, with the results "flat lining".

Within the UK, Scotland has performed slightly better than England in maths and reading, with England higher for science. Northern Ireland is behind them both across all subjects.

But the biggest gap is between Wales and the other parts of the UK, adrift from most of the middle ranking western countries.

Happiest pupils

The lowest ranked countries in this international league table are Peru and Indonesia. The OECD says the gap between top and bottom of this global classroom is the equivalent of six years of learning.

MATHS TOP 10 1. Shanghai 613

2. Singapore 573

3. Hong Kong 561

4. Taiwan 560

5. South Korea 554

6. Macau-China 538

7. Japan 536

8. Liechtenstein 535

9. Switzerland 531

10. Netherlands 523 Source: OECD

However Indonesia also appears as the country where the highest proportion of children say they are happiest at school. And the least happy pupils are in high-performing South Korea.

Finland, once an education superpower at the top of the rankings, has slipped downwards. Along with Sweden, Finland had the biggest fall in scores of any country in maths tests.

Sweden has fallen behind eastern and central European countries such as Poland, Slovakia, Slovenia and Estonia.

But Finland still has the highest position of any European country, fifth in science, the only non-Asian country in any of the top fives.

Among the strongest performances by English-speaking countries are Ireland, ranked 7th in reading, and Canada ranked 10th in science.

Chile is the strongest performer among South American countries, above the lowest-performing European country, Albania.

How regions compare

These Pisa tests provide an increasing level of regional detail and they show the huge variation within a single country.

In Italy, the region of Trento is one of the best in the world at maths, but Calabria is far below many European countries, the equivalent of two years behind.

SCIENCE TOP 10 1. Shanghai 580

2. Hong Kong 555

3. Singapore 551

4. Japan 547

5. Finland 545

6. Estonia 541

7. South Korea 538

8. Vietnam 528

9. Poland 526

10. Canada 525 Source: OECD

The US remains average or below average, below countries such as Russia and Spain, but individual states are high performers.

If Massachusetts was ranked as a country it would be sixth best in the world, ahead of any European country.

From a low base in previous years, one of the biggest improvers in maths and reading is Qatar, a country that has been a high-profile investor in education.

Katja Hall, the chief policy director of the CBI employers' organisation, said: "No issue matters more to the UK economy over the long term than the quality of our education system."

But she warned the results should be a "wake-up call" and that when UK schools are only "treading water" that the country's economic performance will suffer.

"High-performing schools are the best way to support economic growth and greater opportunity."

The OECD's secretary general, Angel Gurria, launching the results in Washington in the US, said: "It's more urgent than ever that young people learn the skills they need to succeed.

"In a global economy, competitiveness and future job prospects will depend on what people can do with what they know. Young people are the future, so every country must do everything it can to improve its education system and the prospects of future generations."