During his election campaign, Trump questioned whether the United States should protect allies seen as spending too little on their defense, raising fears that he could withdraw funding for NATO at a time of heightened tensions with Russia.