* All-share index down 0.5 pct
* Rand firms after slide to one-month low
* Pioneer Food leads decliners after trading update (Adds stocks, analyst quote, details)
JOHANNESBURG, Aug 10 (Reuters) - South African stocks pulled away from record highs on Thursday as rising tensions on the Korean peninsula drove investors to limit risks and shift to safe havens.
But the rand firmed, recovering ground following a slide to a one-month low after President Jacob Zuma survived a no-confidence vote. It remained vulnerable to weak economic fundamentals and political uncertainty.
On the bourse, the JSE All-Share index declined 0.5 percent to 55,700 points, shedding 696 points from a record high of 56,396 points hit on Monday, while the Top-40 index fell 0.54 percent to 49,303 points.
"Generally a softer trend, which is following overseas markets. People are being a little bit more cautious really, they are not rushing into buying stocks," Cratos Capital equities trader Greg Davies said.
North Korea's apparently rapid progress in developing nuclear weapons and missiles capable of reaching the U.S. mainland has fuelled tensions that erupted into a war of words between Washington and Pyongyang this week, unnerving regional powers and global investors.
In currency markets, the rand was trading 0.5 percent stronger at 13.3775 per dollar as of 1552 GMT compared with a close of 13.4525 overnight in New York.
Traders said weaknesses in recent weeks had pushed the rand into an oversold territory.
"But it is still vulnerable, the backdrop is still negative and it is unlikely that this a turning point," said ETM's economist Halen Bothma.
South Africa's annual factory output dropped 2.3 percent in June while mining production slipped 0.8 percent, official data showed on Thursday.
Among movers on the exchange, Pioneer Food fell 6.81 percent to 132 rand, making it the biggest decliner, after reporting a 4 percent decline in 10 months sales.
Bucking the trend, gold shares gained, with the Gold Index up 6.18 percent on safe-haven demand. Geopolitical risk can boost demand for assets seen as safe-havens such as gold.
Government bonds hardly moved with the yield of benchmark paper due 2026 up three basis points at 8.600 percent. (Reporting by Nqobile Dludla and Tiisetso Motsoeneng; Editing by Alister Doyle)