The Canadian dollar weakened against its U.S. counterpart on Thursday, as White House drama and an attack in Barcelona reduced investor appetite for the loonie after it hit a nearly two-week high earlier in the day.

The Canadian dollar hit a nearly four-week low against its U.S. counterpart on Wednesday as worries about increased U.S.-North Korea tension weighed, offsetting higher oil prices and stronger-than-expected domestic housing data.