afterwards , bush attended a ceremony at nearby fort mchenry marking the 175th anniversary of the war of 1812 battle against the british that inspired francis scott key to write `` the star-spangled banner . ''