An attendee takes pictures before the opening ceremony of the 2016 G20 Trade Ministers Meeting in Shanghai, July 9, 2016. REUTERS/Aly Song

Turkey wanted the final communique of the world's financial leaders meeting in China this weekend to include an endorsement of the current government after the failed coup attempt last week, but did not succeed, G20 officials said.

Finance ministers and central bank governors from 20 of the world's biggest economies (G20) are meeting in the Chinese city of Chengdu to discuss, among others, risks to the global economic outlook, clouded by Britain's decision to leave the European Union.

The Turkish government, which introduced a state of emergency on Wednesday after the failed coup and is considering bringing back the death penalty for the plotters, wanted the final communique of the G20, closely watched by markets, to include a paragraph on Turkey.

"Strengthening the rule of law is fundamental for sustainable development and we support the legitimate government of Turkey in its endeavours to enhance economic stability and prosperity," the additional paragraph of the G20 was to say.

Officials from European Union countries, however, did not support that. "Turkey is out of the communique," one G20 official said.

But another G20 official said that the final G20 statement might include a sentence that G20 countries are interested in a stable Turkey.

Western countries backed Turkey's government during last week's failed putsch, but are increasingly worried about Ankara's subsequent crackdown against thousands of members of the security forces, judiciary, civil service and academia. The possibility of Turkey bringing back capital punishment for the plotters has put further strain on Ankara's relationship with the EU, which Turkey seeks to join but which demands candidates forego the death penalty.