(CNN) -- A polarized Somalia marked its 50th anniversary of freedom from colonial rule Saturday with bullets on one end of the country and ballots on the other.
The northwestern region of Somaliland, a former British colony, held a presidential election, while the president of the Transitional Federal Government in the south, a former Italian colony, gave a solemn address in the face of a continuing Islamist insurgency and nearly two decades as a failed state.
Voters lined up at polling stations under tight security in Somaliland where more than 1 million people had registered to cast their ballots, according to the chairman of the electoral commission, Ise Yusuf Mohamed.
Security measures included a 12-hour ban on all vehicles without special permits, Mohamed said. The measures were enforced amid fresh threats of violence going into Saturday's voting by Al-Shabab, the primary Islamist group leading an insurgency in and around Mogadishu in the country's south.
In an audio message to local media, the group's leader, Sheik Mukhtar Abdirahman Abu Zubeyr -- himself a descendant of Somaliland -- called democracy "the Devil's principles" and warned people in Somaliland not to adopt it.
Al-Shabab militants attacked Somaliland and the neighboring semi-autonomous region of Puntland with simultaneous suicide blasts in October 2008 that killed at least 24 people.
But there were no reports of political violence in Somaliland on Saturday, according to the electoral commission.
"I am so happy that we are voting democratically, and I hope that the election will end peacefully," said current President Dahir Riyale Kahin of the ruling party UDUD after casting his vote in Hargeisa, the capital of Somaliland.
Kahin is opposed by two other candidates.
Meanwhile, reports of violence in Mogadishu formed the backdrop of a presidential address in the war-torn south to mark the 50th anniversary of Somalia's independence. Local media reported that government troops were battling al Qaeda-affiliated Islamist insurgents in the capital Saturday.
President Sharif Sheikh Ahmed called the day a "time for reflection on the fate of Somalia," according to a press release from a presidential spokesman.
Ahmed called on Somalis "to raise the Somali flag in their houses, cars, and offices so that the enemies of Somalia would know the love for our country and our people is still alive," according to the release.
Addressing the "political quagmire of the past three decades," Ahmed said that "the Somali people are squarely responsible of the unprecedented predicament that our nation is in and it is up to us to right the wrongs of the past, otherwise we could perish as a nation," according to the release.
The northwestern region of Somaliland achieved independence from Britain on June 26, 1960, followed by the rest of Somalia, which became independent of Italy five days later on July 1, 1960, and joined Somaliland to form the state of Somalia.
After the fall of Somali dictator Siad Barre in 1991, Somaliland declared its separation from Somalia, according to the CIA World Factbook. Somaliland has yet to receive international diplomatic recognition as a state but has achieved a level of security and stability unmatched in the rest of Somalia.
Southern Somalia has not seen a stable government since the fall of the dictatorship and has been mired in civil war since its fall. The ongoing conflict has resulted in "an unprecedented humanitarian crisis," according to the U.N. High Commissioner for Refugees.
"In May (2010), the fighting intensified in Mogadishu and displaced more than 270,000 people, causing the number of internally displaced persons to reach 1.5 million people," according to a report on the UNHCR website.
Journalist Mohamed Amiin Adow contributed to this report.