Other figures showed a collapse in business investment, down 5.5 per cent in the second quarter and only 1.5 per cent higher than a year earlier.
The data confirm that an economic slowdown is under way. Analysts said the figures were unlikely to alter interest-rate prospects as they did not support the case for either a rise or fall in rates.
The latest high-street figures showed that sales rose by 0.9 per cent in July. A rise was expected after retailers said June had been a poor month due to poor weather and the World Cup. In June sales fell by 1.5 per cent. The recovery in July was helped by discounting, and sales of clothing and footwear showed the sharpest rise, growing 6 per cent in July after a 9.4 per cent fall in June.
The erratic picture of recent months has not obscured the underlying trend which, says the Office for National Statistics, "still suggests a slowdown".
The best guide is the change in the latest three months compared with the same period a year earlier. This shows retail sales growth falling from 5.9 per cent last summer as consumers spent windfalls from converting building societies, to 3.2 per cent now. The rate has fallen continuously this year.
Geoffrey Dicks, economist at Greenwich NatWest, said little should be read into the July recovery, which was due to aggressive pricing in sales.
The figures on business investment add to the picture of a slowdown. The sharpest falls were in investment by public corporations and utilities. Investment spending is always lumpy and too much should not be read into one quarter's figures. But recent surveys from the CBI and British Chambers of Commerce have warned of a sharp decline in investment intentions. Compared with a year ago, business investment is up by just 1.5 per cent - the slowest growth rate since the fourth quarter of 1995.