Senior government officials in multiple U.S.-allied countries were targeted earlier this year with hacking software that used Facebook Inc.'s WhatsApp to take over users' phones, according to people familiar with the messaging company's investigation.

Sources familiar with WhatsApp's internal investigation into the breach said a "significant" portion of the known victims are high-profile government and military officials spread across at least 20 countries on five continents.

The hacking of a wider group of top government officials' smartphones than previously reported suggests the WhatsApp cyber intrusion could have broad political and diplomatic consequences.