Francis Bellamy, a socialist Baptist minister, wrote the Pledge of Allegiance in 1892. At the time, Bellamy was hired to work at the Youth’s Companion magazine for the purpose of writing a pledge to the flag. Since 1888 the magazine had been promoting the sale of the United States flag. The magazine became an avid supporter of the “Schoolhouse Flag Movement” in which all public schools were encouraged to purchase and display a flag.
By 1892, 26,000 flags had been sold by the magazine. Sales were lagging; the magazine hired Bellamy to write a pledge to refresh interest in the flag.