XIAN, China May 19 (Reuters) - China's Sinopec said it has agreed key terms with Kazakh state-owned oil and gas firm KazMunayGaz to build a gas-based petrochemical complex in Kazakhstan's Atyrau region and a final investment decision will be made in 2024.

The agreement was signed on the sidelines of the ongoing China-Central Asia Summit in Xian in China's Shaanxi province, where China President Xi Jinping is meeting with the leaders of five ex-Soviet countries to discuss enhanced cooperation in a range of fields, including energy.

The companies agreed to build a petrochemical complex processing ethane - a by-product from natural gas field - into ethylene with an annual capacity of 1.275 million tonnes, Sinopec said in its inhouse newspaper on Friday.

They also agreed to build two polyethylene facilities each sized at 625,000 tonnes a year, the report added.

President Xi met with Kazakh counterpart Kassym-Jomart Tokayev on Wednesday, where the two discussed deepening trade and economic ties between the countries.

China's three main state-owned oil firms Sinopec, PetroChina and CNOOC have all previously made investments in Kazakhstan's oil and gas sector. PetroChina is a member of the consortium that is currently developing the Kashagan field in the Caspian Sea - Kazakhstan's second-largest producing field - alongside Western oil majors and KazMunayGaz.

Investment between China and the five nations reached a record high of more than $70 billion in 2022. (Reporting by Andrew Hayley; additional reporting by Chen Aizhu in Singapore; Editing by Bernadette Baum, Mark Potter and Sherry Jacob-Phillips)