Although countries only agreed to "phase down" rather than "phase out" coal, the prime minister said this was a fantastic achievement.
The wording change was made after a late intervention by China and India.
But it remains the first time plans to reduce coal have been mentioned in such a climate deal.
The agreement was reached after the two-week Glasgow COP26 summit went into overtime on Saturday.
Critics have said the deal does not go far enough and will not meet the key summit goal of limiting global warming to 1.5C by the end of the century.