SEOUL, April 19 (Reuters) - South Korea might extend its support for Ukraine beyond humanitarian and economic aid if it comes under a large-scale civilian attack, President Yoon Suk Yeol said, signalling a shift in his stance against arming Ukraine for the first time.

In an interview with Reuters ahead of his state visit to the U.S. next week, Yoon said his government has been exploring how to help defend and rebuild Ukraine, just as South Korea received international assistance during the 1950-53 Korean War.

"If there is a situation the international community cannot condone, such as any large-scale attack on civilians, massacre or serious violation of the laws of war, it might be difficult for us to insist only on humanitarian or financial support," Yoon said.

It was the first time that Seoul suggested a willingness to provide weapons to Ukraine, more than a year after ruling out the possibility of lethal aid.

A key U.S. ally and major producer of artillery ammunition, South Korea has so far tried to avoid antagonising Russia due to its companies operating there and Moscow's influence over North Korea, despite mounting pressure from western countries for weapons supply.

"I believe there won't be limitations to the extent of the support to defend and restore a country that's been illegally invaded both under international and domestic law," Yoon said. "However, considering our relationship with the parties engaged in the war and developments in the battlefield, we will take the most appropriate measures."

Yoon is scheduled to visit Washington next week for a summit with U.S. President Joe Biden to mark the 70th anniversary of the two countries' alliance.

During the summit, Yoon said he will seek "tangible outcomes" on the allies' efforts to improve responses to evolving threats from North Korea, which has ramped up military tests, and launched its first solid-fuel intercontinental ballistic missile last week.

Seoul, for its part, will step up its surveillance, reconnaissance and intelligence analysis capability and develop "ultra-high-performance, high-power weapons" to fend off the North's threats, Yoon said.

"If a nuclear war breaks out between South and North Korea, this is probably not just a problem between the two sides, but the entire Northeast Asia would probably turn to ashes. That has to be stopped," he said.

When asked if the allies would envision an Asian version of NATO's nuclear planning group involving Japan, Yoon said they are focusing on bilateral measures to strengthen information-sharing, joint contingency planning and joint execution of the plans.

In February, South Korea and the U.S. staged table-top exercises simulating a North Korea nuclear attack as part of Seoul's efforts to play a bigger role in Washington's nuclear policy over the North.

"In terms of responding to a powerful nuclear attack, I think stronger measures than what NATO has should be prepared, Yoon said.

"I think there's no big problem if Japan is joining, but since there's been much progress between the U.S. and South Korea, it would be more efficient to create this system ourselves first."