* Main opposition party not far behind in vote
* Government must deal with shrinking economy, investors
* Country has some of world's largest mineral deposits (Adds analyst comment, background on mining)
By Sabina Zawadzki
COPENHAGEN, Nov 29 (Reuters) - Greenland's ruling Siumut Party narrowly won a snap election, results showed on Saturday, but its new leader Kim Kielsen will need to build a coalition to form a government to deal with a shrinking economy and reassure foreign investors.
The fall of premier Aleqa Hammond last month in an expenses scandal has muted a nationalist rhetoric that promised independence from Denmark based on wealth from some of the largest mineral deposits on earth.
With nascent mining projects languishing due to persistently low commodity prices and regulatory uncertainty, analysts expected any victor in the polls to focus on reviving a subsidised economy heading for its third year of recession.
Siumut, which has formed every single government in Greenland but one since 1979, won 34.3 percent of the vote. Opposition party Inuit Ataqatigiit, led by Sara Olsvig, won 33.2 percent, Greenland's official election website showed.
Although both parties won the same amount of seats in parliament - 11 each out of a total of 31 - Kielsen is expected to lead coalition negotiations as his party received more votes.
Greenland, whose capital Nuuk is closer to New York than Copenhagen, became a Danish colony in the early 19th century but has been gaining its own powers since World War Two, introducing a parliament in 1979 and self-governance in 2009.
Just 56,000 people live dotted around the coast of the largest non-continental island on earth.
A Siumut-led government may comfort the few foreign investors who have ventured into Greenland to develop mining. A government led by the party lifted a ban on uranium mining last year, opening the door to rare earth projects which often generate uranium as a byproduct.
So far companies from Australia and Canada have entered Greenland to mine a variety of minerals, some with Chinese contractors.
Inuit Ataqatigiit had vehemently opposed the lifting of the ban and had promised to reinstate it, although the party was keen to emphasise it was not against mining per se.
"Overall, the outcome of this election is very good news for investors, especially in the mining and infrastructure sectors," said Mikaa Mered, analyst and managing partner at consultancy Polarisk.
"With Siumut remaining in power ... we expect Greenland to stabilise itself - both from a political risk and a regulatory risk standpoint - whilst keeping the country's march towards independence."
There are about 40,000 eligible voters in Greenland, 29,500 of whom voted - marking a turnout of above 70 percent. (Editing by Pravin Char)