They don't normally kill hostages unless they come under attack, including during rescue attempts.
An official in the semi-autonomous state of Puntland said more than two dozen men boarded the ship off Somalia's northern coast, an area known to be used by weapons smugglers and members of the al-Qaida-linked extremist group al-Shabab.
The official spoke on condition of anonymity because they were not authorized to speak to the press.
A Britain-based spokeswoman for the European Union Naval Force operation off Somalia, Flt Lt Louise Tagg, confirmed that an incident involving an oil tanker had occurred and an investigation was underway.
The US Navy's 5th Fleet, which is based in Bahrain and oversees anti-piracy efforts in the region, did not immediately respond to a request for comment.
The ship was anchored off the town of Alula, said Salad Nur, a local elder.'The ship is on the coast now and more armed men boarded the ship,' he said by phone.