The Pledge of Allegiance, the one we all recited as school children (although mine most assuredly did not include under God* in the early grades) and still do at public events, was written in 1892 by Francis Bellamy. It started out as part of a marketing plan to offer flags to schools that subscribed to The Youth’s Companion, but quickly became a sincere patriotic effort. We all know how successful it was.
And Mr. Bellamy? Well.
Bellamy was a Christian Socialist who “championed ‘the rights of working people and the equal distribution of economic resources, which he believed was inherent in the teachings of Jesus.'” In 1891, Bellamy was forced from his Boston pulpit for his socialist sermons, and eventually stopped attending church altogether after moving to Florida, reportedly because of the racism he witnessed there.
* The words Under God were added in 1954 to protect us from godless Communism – by our feckless Congress Critters who, in matters sacred (like American uteri), were just as vigilant then as they are now.
(h/t Crazycrawfish for the info.)