CHANGWON, South Korea — A year after Russia invaded Ukraine, the war has spurred a global effort to produce more missiles, tanks, artillery shells and other munitions. And few countries have moved as quickly as South Korea to increase output.

Last year, South Korea’s arms exports rose 140 percent to a record $17.3 billion, including deals worth $12.4 billion to sell ​tanks, ​howitzers, ​fighter jets and multiple rocket launchers to Poland, one of Ukraine’s closest allies.

But as South Korea expands weapons sales globally, it has refused to send lethal assistance to Ukraine itself. Instead, it has focused on filling the world’s rearmament gap while resisting any direct role in arming Ukraine, imposing strict export control rules on all its sales.

South Korea’s wariness stems in part from its reluctance to openly antagonize Moscow, from which it hopes for cooperation in imposing new sanctions against an increasingly belligerent North Korea. Countries throughout Latin America, Israel and others have also declined to send weapons directly to Ukraine.

Yet few nations’ defense industries have boomed as a result of the Russian invasion as much as South Korea’s has. And despite appeals from Kyiv and NATO to send weapons into Ukraine, Seoul has continued to walk a tightrope, balancing between its steadfast alliance with Washington and its own national and economic interests.

Unlike American allies in Europe that scaled down their militaries and arms production capacities at the end of the Cold War, South Korea has kept a robust domestic defense supply chain to meet demand from its own armed forces and to guard against North Korea.

Since the Russian invasion, arms suppliers like the United States have faced major production shortages for rocket launchers and other arms. Germany and other nations have also struggled to secure enough tanks to send to Ukraine.

Buyers began looking elsewhere.

As countries in Eastern Europe raced to re-equip and upgrade their militaries after sending their Soviet-era weapons to Ukraine, South Korea became an enticing option.

The contracts for Poland’s tanks and howitzers were signed in late August with South Korea’s top defense contractors. It took little more than three months for the first shipment to arrive. Warsaw appreciated the ​speed.

“When a shipment is received, it is said that we have been waiting for this day for a long time,” President Andrzej Duda of Poland said, welcoming the shipment’s arrival at the seaport. “With great satisfaction, I want to emphasize that we did not wait long for this day.”

The orders from Poland were a boon to the government of President Yoon Suk Yeol, who has vowed to make his country the fourth-largest weapons exporter by 2027, after the United States, Russia and France.

From 2017 to 2021, South Korea was the fastest-growing among the world’s top 25 arms exporters, ranking No. 8 with a 2.8 percent share of the global market, according to the Stockholm International Peace Research Institute. That was before it landed contracts with Poland, Egypt and the United Arab Emirates last year.

Hanwha Aerospace, South Korea’s largest defense contractor, is busier than ever, planning to scale up its production capacity three times by next year.

On a recent afternoon in Changwon, an industrial town on South Korea’s south coast, the country’s best-selling weapon, the K9 self-propelled howitzer, was taking shape amid white-hot sparks and robotic drilling inside a Hanwha plant the size of six football fields.

“We need to add two more assembly lines to meet a growing demand,” said Hanwha engineer Park Sangkyu, referring to orders of K9s from Poland and other nations, as he pointed to empty corners where the new facilities will go. The layout of the giant factory is being adjusted to accommodate them.

Seoul denounced the invasion of Ukraine, and Mr. Yoon has vowed to protect values like “freedom” and the “rules-based” international order. But South Korea’s eagerness to increase arms exports amid the war has also highlighted its difficulties with that balancing act.

President Vladimir Putin has warned South Korea against aiding Ukraine militarily, saying that doing so would ruin relations between Moscow and Seoul and could prompt Russia to deepen military ties with North Korea. The war in Ukraine has already moved North Korea closer to Russia; it openly supported the invasion, and Washington has accused it of shipping artillery shells, rockets and other munitions to Russia.

When Seoul agreed to sell artillery shells to help the United States replenish its stockpiles, it insisted on ​an explicit export-control condition that ​the “end user” would be the United States, a rule that it has had in place for all its global arms deals — including its contracts with Poland — for decades.

Nonetheless, some South Korean weapons technology has already made its way to Ukraine: The Polish Krab howitzers that were sent to Ukraine use the chassis from South Korean K9s. (South Korea’s Defense Acquisition Program Administration refused to comment on whether the transfer violated export controls.)

“It’s possible for South Korean weapons to end up in Ukraine through other countries,” said Yang Uk, a weapons expert at the Asan Institute for Policy Studies in Seoul. “There is doubt how vigorously South Korea would​ enforce its export controls in such cases.”

When Mr. Yoon and President Biden met in Seoul in May, they agreed to cooperate on the defense industry supply chain. And although South Korea does not make the Soviet-era weapons Ukraine needs most, many of its arms systems are compatible with the NATO weaponry heading to Ukraine.

Hanwha hopes to share its technologies in artillery and armored vehicles with the United States and help arm NATO with weapons the Americans no longer make or are unable to supply fast enough. “The United States cannot make every weapon,” said Son Jae Il, president of Hanwha Aerospace.

“Geopolitics has made it our destiny to nurture a defense industry,” Mr. Son said recently in Hanwha’s Seoul office.

While the United States made high-end weaponry like aircraft carriers, nuclear submarines and state-of-the-art aircraft in the rivalry with Russia and China, South Korea has focused on “midlevel weapons like artillery, armored vehicles and tanks, and accumulated competitive technologies there,” he added.

Hanwha has supplied the South Korean military with almost 1,200 K9 howitzers since the late 1990s, as well as hundreds more for India, Turkey, Estonia, Finland and Norway. Hanwha’s K9s accounted for 55 percent of the world’s self-propelled howitzer export market from 2000 to 2021, according to South Korean analysts.

Poland’s huge order will increase that economy of scale. Romania is another NATO nation negotiating to buy South Korean K9s.

South Korea sweetens its arms export deals by offering to transfer technology and facilitate local production, enhancing the domestic defense industries of its buyers.

Turkey built its main battle tank, Altay, and its T-155 howitzers based on South Korean models. Hanwha is building a factory in Australia to assemble K9s with local suppliers. Most of the South Korean howitzers Poland is buying will be produced in Poland with local partners.

South Korea knows firsthand how powerful such incentives can be.

​For decades, the country struggled to make its own weapons by reverse-engineering American military hardware. Hanwha, formerly known as Korea Explosives, was making dynamite when the government designated it as a defense contractor in the 1970s to make grenades, land mines and signal flares.

It now makes radar systems, aircraft engines, bomb-disposal robots, unmanned combat vehicles and antiaircraft guns. It also partners with South Korea’s space program.

As the war in Ukraine grinds on, Hanwha has set its sights firmly on the global market, with the full support of the South Korean government and military. Mr. Yoon met his Polish counterpart in June to help seal the weapons deals last year. In January, his office announced it had opened a new task force to promote arms exports.