How did Batanes Islands came to be part of the Philippines?

Although Batanes geographically lies between Northern Luzon and Taiwan, its group of islands are actually a little bit closer to Taiwan. Contact with its northern neighbors might have been frequent in pre-Hispanic times, since the Batanic languages are strongly linked to other branches of Austronesian languages still spoken by the indigenous groups.