Lews Castle was used as a naval hospital during World War II
Efforts to restore a castle in the Western Isles built in 1847 for a rich opium trader have secured £240,000 from the Heritage Lottery Fund (HLF).
A further £2.6m of lottery funds could be awarded to Lews Castle if the restoration project's trust can produce detailed proposals within two years.
Lews Castle in Stornoway was constructed for James Matheson, who made his fortune from the opium trade.
Opium exported from China and India was often mixed with tobacco by smokers.
William Lever, whose family business went on to become food and household products maker Unilever, owned the castle from 1918 to 1923.
He installed central heating, electric lighting and internal telephones and extended the ballroom to accommodate his parties.
During World War II it served as a naval hospital and accommodation for the air and ground crew of 700 Naval Air Squadron who operated a detachment of amphibious bi-planes from a slipway in the castle grounds.
Now vacant, Lews Castle is listed on the Buildings at Risk Register.
It has been proposed to restore the building and use it to house a museum.
The trust would have to bid against other projects to secure the £2.6m.
Angus Campbell, Lews Castle Trust Steering Group chairman, said the funding was "great news".
He added: "It is gratifying that in a very competitive funding environment HLF have seen the value and the potential of restoring Lews Castle, bringing it back to life and making it accessible to everyone."
Colin McLean, head of HLF Scotland, said: "This project has the potential to make a real difference to the economy of Lewis and indeed the Western Isles through job creation and tourism."