John McCain supported the war while Barack Obama opposed it .
John McCain lost the election to Barack Obama .