Temporary workers at Hyundai Motor <005380.KS> on Thursday agreed to end a one-month sit-in, pushing up shares of the South Korean top automaker.

Since November 15, subcontracted employees have occupied a factory in the South Korean carmaker's largest domestic production base, hitting output of subcompact cars such as the Verna and the new Accent.

The strike had cost Hyundai 315 billion won ($277 million) in lost production as of Thursday morning causing it to report the worst November sales among Korean automakers.

We have agreed to end a strike today and start talks with management, said Kim Sang-min, a spokesperson for the Korean Metal Workers' Union, a umbrella union of Hyundai contract workers.

Hyundai shares closed up 2.5 percent in a broader market that was up 1.7 percent.

The end of strike brought relief to Hyundai shares that had been in a slump, Kang Sang-min, an analyst at Hanwha Securities.

Labor unrest has often caused disruptions in Asia's fourth-largest economy. Hyundai's union which is the most powerful in the country decided not to strike this year for the second consecutive year.

Temporary workers want job security which employers refuse to deliver so as to cut costs and raise flexibility.

Striking workers came under mounting pressure from management and even regular employees to end the strike and Hyundai filed a combined 16.2 billion won in damage suits against striking unionists.

(Reporting by Hyunjoo Jin; Editing by David Chance)