BEIRUT, Lebanon — Lebanon’s prime minister resigned on Friday and called for a national unity government to rescue the country from deepening sectarian divisions over the war in neighboring Syria, which threatens to spill over the border. Lebanon’s most powerful political factions back opposite sides in the Syrian conflict.

Advisers to Prime Minister Najib Mikati said he had resigned to protest the cabinet’s refusal to extend the tenure of the national police chief, viewed by many Sunni Muslims in Lebanon as their only remaining protector in the country’s deeply politicized security forces. He also objected to Parliament’s failure to agree on rules to govern elections set for later this year.

“The region is descending into the unknown; regional fires are infecting us with their heat; and internal divisions are leaving deep scars,” Mr. Mikati said in a speech Friday night, calling for all political factions to “shoulder their responsibility” and seek consensus.

The crisis reflects the growing sense of insecurity among Lebanon’s many religious sects, whose precarious balance of power is increasingly endangered as the strongest political faction, the Shiite Muslim party Hezbollah, backs the Syrian government, and its Sunni rivals support the Sunni-led Syrian insurgency.