MOMBASA, Kenya – Kenya’s presidential election drew millions of eager voters who endured long lines to cast ballots Monday, but the vote was marred by violence that left 19 people dead, including four policemen hacked to death by machete-wielding separatists.

Officials urged voters not to be intimidated by the violence amid fears the impending election results could spark another round of the ethnic-related bloodshed in which more than 1,000 people died after the 2007 vote.

The election is the first presidential poll under a new constitution designed to prevent the ethnic violence of 2007-08. Enthusiastic voters formed long lines around the country, and election officials estimated turnout at 70 percent of 14 million registered voters.

The voting got off to a bloody start when a group of 200 separatists set a trap for police in the coastal city of Mombasa in the pre-dawn hours, Inspector General David Kimaiyo said. Four police were hacked to death with machetes, coast police boss Aggrey Adoli said.

The separatist group — the Mombasa Republican Council — had threatened election day attacks, and Kimaiyo said police were planning a raid “that will see the end of the MRC.”

The MRC believes Kenya’s coast should be an independent country. Their cause, which is not defined by religion, is fueled by the belief that political leaders in Nairobi have taken the coast’s land for themselves, impoverishing indigenous residents.

In addition to the attack in Mombasa, police blamed the MRC for three deadly attacks in nearby Kilifi. An Associated Press reporter visited a morgue and saw four dead young men wearing red bandanas — a sign of the MRC — who had been shot to death.

After the polls closed, gunshots and an explosion rang out in the city of Garissa, near the Somali border, as gunmen stormed two polling stations, said Farah Maalim, the deputy speaker of parliament. Security forces responded to the attack and the gunmen fled.

The violence in the Mombasa and Garissa areas is separate from the ethnic violence that could break out related to election results, and which was so deadly after the 2007 vote.

The country’s top two presidential candidates condemned the Mombasa attacks. Prime Minister Raila Odinga called it a “heinous act of aggression” during a historic exercise. Deputy Prime Minister Uhuru Kenyatta said he was discouraged by the news but he was sure the security situation would be brought under control.

Long lines left voters frustrated in the election’s early hours. Anti-fraud computers that scan thumbprints to identify registered voters were used for the first time and appeared to be greatly slowing the process. Equipment broke down in some polling stations and power blackouts made the technology useless in others. Many voting officials had to resort to going through the old voters’ register.

Results are not expected until Tuesday or Wednesday. A run-off between the top presidential contenders is likely in April, unless one unexpectedly captures more than 50 percent of ballots from among the pool of eight candidates.