Francis Bellamy, an ordained minister, had taken the writing assignment to create a pledge that would be taken on Columbus Day by millions of school children. Under the pressure of a deadline, Bellamy created the following pledge, which didn’t mention the words “under God”:

“I pledge allegiance to my flag and the Republic for which it stands—one Nation indivisible—with liberty and justice for all.”

Bellamy added an extra word, “to,” before “the Republic,” but other school officials modified the pledge over the years. Two historical groups added “to the flag of the United States of America.”

In 1942, President Franklin D. Roosevelt signed a Flag Code law passed by Congress that included the Pledge.

The Supreme Court then took the unusual step of ruling against the Jehovah's Witnesses in a legal fight against the Pledge and reversing its own ruling within three years.

First in 1940 in the case of Minersville v. Gobitis, the Court said that a public school could force students who were Jehovah's Witnesses to salute the flag and say the pledge. Justice Felix Frankfurter said in the majority opinion that "conscientious scruples have not, in the course of the long struggle for religious toleration, relieved the individual from obedience to a general law not aimed at the promotion or restriction of religious beliefs."

However, in 1943, the Court changed its course in West Virginia State Board of Education v. Barnette, where the majority saidthat “the Free Speech clause of the First Amendment prohibits public schools from forcing students to salute the American flag and say the Pledge of Allegiance.”

"If there is any fixed star in our constitutional constellation, it is that no official, high or petty, can prescribe what shall be orthodox in politics, nationalism, religion, or other matters of opinion or force citizens to confess by word or act their faith therein. If there are any circumstances which permit an exception, they do not now occur to us,” said Justice Robert Jackson in his opinion.

Justice Frankfurter said in his dissent that, “The very purpose of a Bill of Rights was to withdraw certain subjects from the vicissitudes of political controversy, to place them beyond the reach of majorities and officials and to establish them as legal principles to be applied by the courts.”

Later in the decade, some local groups added the words “under God” to the Pledge and in 1954, President Dwight Eisenhower signed a bill passed by Congress that put the words "under God" within the phrase "one nation indivisible."

Over the following decades, there have been legal challenges to the Pledge and the use of the two words in the Pledge.

Most notably, in 2004 the Supreme Court ruled in a case from an atheist who said a California school’s pledge requirement violated his daughter’s rights under the First Amendment’s Establishment and Free Exercise Clauses. The Supreme Court decided in Elk Grove Unified School District v. Newdowthe Justices didn’t rule on the legality of the words “under God” violating the First Amendment. Instead, Justice John Paul Stevens said Newdow didn’t have standing to bring suit because he lacked sufficient custody over his daughter.

But Chief Justice William Renquist and Justices Sandra Day O'Connor and Clarence Thomas wrote separate concurrences, stating that requiring teachers to lead the Pledge was constitutional.

A similar challenge to the pledge was denied by two federal appeals courts in 2010, which ruled that “that the Pledge of Allegiance does not violate the Establishment Clause because Congress’ ostensible and predominant purpose was to inspire patriotism" and “both the choice to engage in the recitation of the Pledge and the choice not to do so are entirely voluntary.”

Two recent legal challenges also targeted state constitutions, and not the U.S. Constitution, for guidance about using the words “under God.”

Back in 2014 in Massachusetts, the case of Jane Doe Vs. Acton-Boxborough Regional School District involved a group of parents, teachers and the American Humanist Association in an action against a school district. The group claimed the Pledge requirement, including the use of the words “under God,” violates the equal protection clause of the state’s constitution. The state Supreme Court didn't agree.

Also in 2014, a New Jersey family and the American Humanist Association filed a similar lawsuit against the Matawan-Aberdeen Regional School District, seeking to eliminate the use of the words “under God” from Pledges taken at public schools. The school district said that it is just following a New Jersey state law that requires schools to have a daily recitation of the pledge, and that individual students aren’t forced to take part. In February 2015, a judge ruled in favor of the school district.

Scott Bomboy is the editor in chief of the National Constitution Center.