* "Specific threat" against Westerners in Somaliland
* Britain urges all nationals to leave Somalia
* Threat follows Libya warning, Algerian hostage crisis (Adds background, Irish comment, Foreign Office spokesman)
By Peter Griffiths
LONDON, Jan 27 (Reuters) - The British government warned on Sunday of a "specific threat" to foreigners in Somalia's breakaway enclave of Somaliland and urged its nationals to leave the country immediately.
Britain's Foreign Office gave no details of the threat in the Horn of Africa state, but highlighted in a statement the ongoing danger of "kidnapping for financial or political gain, motivated by criminality or terrorism".
"We are now aware of a specific threat to Westerners in Somaliland, and urge any British nationals who remain there against our advice to leave immediately," the statement said.
Ireland has issued the same alert to its citizens, a spokesman at the Department of Foreign Affairs in Dublin said.
It follows a warning from European countries on Thursday of a "specific and imminent" threat to foreigners in the eastern Libyan city of Benghazi.
Britain spoke earlier this month of a growing militant threat in North Africa, which Prime Minister David Cameron has called a "magnet for jihadists".
The warnings came after at least 38 hostages were killed in an Islamist militant attack on Algeria's In Amenas gas complex near the Libyan border, along with the start of French military operations against jihadi rebels in Mali.
Britain already advises against all travel to Somalia and Somaliland due to the "high threat from terrorism" and kidnapping.
Somalia has suffered two decades of civil war that deepened poverty and lawlessness and led to a rise in piracy in the busy shipping lanes off its coast.
There have been threats against foreigners in Somalia since U.S. forces killed al Qaeda founder Osama bin Laden in 2011, the Foreign Office says. Islamist militants have attacked overseas workers in the past and they continue to pose a risk.
A Foreign Office spokesman said there were relatively few Britons working in Somalia, mainly charity workers and diplomats. However, there is a higher number of Britons with a Somalia background who visit relatives in the region.
Britain has one of the oldest and largest Somali communities in Europe, with an estimated population of up to 100,000.
The Foreign Office, citing security reasons, said it would not release more details about the threat or comment on the source of their information.
It said the threat centres on Somaliland, a former British colony that has not won international recognition as a state since it declared independence from Somalia in 1991.
Somaliland has enjoyed relative stability compared to the rest of Somalia and has held a series of peaceful elections. (Additional reporting by Padraic Halpin in Dublin; Editing by Mark Heinrich)