* India still has significant outstanding issues
* Other 15 countries to prepare for signing in 2020 (Adds quote from participating countries, Modi, Chinese official, trade analyst)
BANGKOK, Nov 4 (Reuters) - China joined 14 countries on Monday in agreeing terms for what could be the world's biggest trade pact, but India pulled out at the last minute on the grounds that the deal would hurt its farmers, businesses, workers and consumers.
The Sino-U.S. trade war and rising protectionism have given new impetus to years of negotiations on the Regional Comprehensive Economic Partnership (RCEP), which brings together the 10-member Association of Southeast Asian Nations (ASEAN), China, Japan, South Korea, Australia and New Zealand.
Members said the deal would be signed next year after the 15 countries without India reached agreement in Bangkok on the text and market access issues.
"Against the backdrop of a fast-changing global environment, the completion of the RCEP negotiations will demonstrate our collective commitment to an open trade and investment environment across the region," the countries said in a statement.
They opened the door to India potentially joining them later, if the issues it has with the deal are resolved.
But Indian Prime Minister Narendra Modi said that he had to take into account the interests of Indian people.
"When I measure the RCEP Agreement with respect to the interests of all Indians, I do not get a positive answer," Modi said in a speech in Bangkok, according to a government note.
"Neither the Talisman of Gandhiji nor my own conscience permit me to join RCEP," he said, in a reference to "father of the nation" Mahatma Gandhi's maxim to always think of the poorest in society in a situation of doubt.
India has been worried that the agreement, which requires the gradual elimination of tariffs, would open its markets to a flood of cheap Chinese goods and agricultural produce from Australia and New Zealand that would harm local producers.
Longstanding rivals China and India, who fought a border war in 1962, also clashed verbally in recent days over India's decision to formally revoke the constitutional autonomy of the disputed Muslim majority state of Kashmir.
Even without India, the countries in the RCEP bloc account for nearly a third of global gross domestic product, but its departure means they have less than a third of the world's population instead of around half.
"While I'm pleased that the 15 were able to conclude, it is a pity India proved unable to rise to the occasion. It was a massive missed opportunity," said Deborah Elms of the Asian Trade Centre in Singapore.
"In the meantime, this is excellent news for trade and Asia," she said, noting that there was still time for India to sign.
Chinese Vice Foreign Minister Le Yucheng said: "Whenever India is ready they are welcome to come on board."
An advantage for the other countries of having relative heavyweight India in the trade pact would have been less domination by China, particularly at a time they see the United States as a less reliable trade and security partner.
U.S. President Donald Trump's administration sent a lower level delegation this year than it has previously to the back-to-back East Asian Summit and U.S.-ASEAN Summit.
Because of the downgrade in the U.S. delegation, officials from only three of the 10 regional countries joined the usual U.S.-ASEAN meeting.
U.S. Commerce Secretary Wilbur Ross told a business meeting on the sidelines of the summit that the Trump administration was "extremely engaged and fully committed" to the region.
White House national security adviser Robert O'Brien brought an invitation to a summit from Trump himself and pleased some Southeast Asian leaders by criticising Chinese actions in the disputed South China Sea.
But diplomats and analysts said the message from Washington was clear.
"Doubts have been raised in a more serious way about the Trump administration engaging and this may also play into the hands of other superpowers in pushing their own agendas," said Panitan Wattanayagorn, a former Thai national security adviser. (Additional reporting by Neha Dasgupta and Manoj Kumar in New Delhi, Panarat Thepgumpanat in Bangkok; Writing by Matthew Tostevin; Editing by Alex Richardson)