The president couldn’t help but gloat.