The Beirut strike followed another on a school sheltering displaced people in the Gaza Strip which killed at least 27 people, Palestinian medical officials said.