Sweden said on Saturday it was shutting its embassy in Beirut amid fears the war in Gaza could escalate into a region-wide conflict, after urging thousands of its citizens to leave Lebanon.