* Shipbuilders lead gains; STX soars 5 pct
* Samsung Elec up 1.9 pct ahead of U.S. shopping season
* Automakers Hyundai and Kia take breather
By Somang Yang
SEOUL, Nov 19 (Reuters) - South Korean shares posted their strongest gain in nearly two weeks on Monday, supported by bargain hunters and hopes for a U.S. fiscal deal to avert the threat of recession in the world's largest economy.
The Korea Composite Stock Price Index (KOSPI) rose 0.9 percent to 1,878.10 points, edging up from Friday's three-and-a-half month low.
However, Lim Dong-rak, an analyst at Hanyang Securities, warned that the gains were little more than a technical rebound from last week's losses. The KOSPI fell 2.3 percent last week to reach its lowest close since Aug 3.
Programme trading drove the index, with a net 287 billion Korean won ($263 million) worth of shares bought via computer-driven transactions, the highest amount since Oct. 29, according to Korea Exchange data.
U.S. equities closed higher on Friday after Congress leaders pledged to find common ground on taxes and spending that would allow them to avoid a "fiscal cliff" of mandatory tax hikes and spending cuts.
Most stocks rose, with gaining shares dwarfing losers 603 to 237.
Shipbuilders led the charge, with STX Offshore & Shipbuilding rallying 5 percent and Hyundai Heavy Industries up 2.8 percent.
"Shipbuilders, which are very sensitive to changes in the index, were casualties of the sluggish market last week. They are now recouping losses," said Lee Yoon-sang, a sector analyst at NH Securities.
Tech heavyweight Samsung Electronics rose 1.9 percent, leading the sector's gains ahead of the U.S. year-end shopping season which kicks off on Friday. LG Display , which supplies panels for smartphones, computers and TVs, gained 1.8 percent.
Autos bucked the trend, with Hyundai Motor and sibling Kia Motors falling 0.7 percent and 2.4 percent respectively.
Local government funds bought a net 187 billion won ($171 million) worth of KOSPI shares, buttressing the main board despite selling by retail and foreign investors.
The KOSPI 200 benchmark of core stocks closed up 1 percent, while the junior KOSDAQ edged 2.1 percent higher.
Move on day +0.93 percent
12-month high 2,057.28 14 March 2012
12-month low 1,750.60 19 Dec 2011
Change on yr +2.87 percent
All-time high 2,231.47 27 April 2011
All-time low 93.10 6 January 1981 ($1 = 1092.2250 Korean won) (Editing by Richard Pullin)