Each year, on the first Thursday of May, the U.S. marks the National Day of Prayer. Although the day of observance has its roots in the American Revolution, it wasn’t formally recognized until President Harry S. Truman signed a law to annually recognize it in 1952.

National Day of Prayer 2017 will be the first one during President Donald Trump’s administration. He will be marking the day with his first trip to New York City since becoming president and is expected to sign a controversial religious freedom executive order.

“The religious liberty guaranteed by the Constitution is not a favor from the government, but a natural right bestowed by God,” Trump wrote in his National Day of Prayer proclamation. “Our Constitution and our laws that protect religious freedom merely recognize the right that all people have by virtue of their humanity. As Thomas Jefferson wisely questioned: ‘Can the liberties of a nation be thought secure when we have removed their only firm basis, a conviction in the minds of the people that these liberties are the gift of God?'”

Here’s what you need to know about the National Day of Prayer.

1. A Day of Prayer & Fasting Dates Back to the American Colonial Period

Abraham Lincoln – National Day of Prayer – Proclamation 97 – Hear the TextListen to and read Proclamation 97, Appointing a Day of National Humiliation, Fasting and Prayer, an executive order signed by U.S. President Abraham Lincoln on March 30, 1863. Narrator: Timelessreader1 Text: The text in this video, written in 1863, is in the Public Domain. 2014-01-29T00:06:29.000Z

Although one of the ideals that the U.S. was founded on was religious freedom, days of prayer and fasting were observed even before the colonies gained independence. According to Derek H. Davis’ Religion and the Continental Congress, 1774-1789, days of humiliation, fasting and Thanksgiving date in the New England colonies began in the 1600s.

During the tense period leading up to the American Revolution, Boston and other towns in Massachusetts created days of prayer and fasting in September to protest the arrival of British troops. In 1774, the idea started to spread in the Southern states, beginning in Virginia.

Although the early presidents started a tradition of issuing prayer proclamations, it fell by the wayside from 1815 to 1862. In March 1863, Lincoln revived the idea, calling for a National Fast Day on April 30, 1863. Lincoln wrote:

We have been the recipients of the choicest bounties of Heaven. We have been preserved, these many years, in peace and prosperity. We have grown in numbers, wealth and power, as no other nation has ever grown. But we have forgotten God. We have forgotten the gracious hand which preserved us in peace, and multiplied and enriched and strengthened us; and we have vainly imagined, in the deceitfulness of our hearts, that all these blessings were produced by some superior wisdom and virtue of our own. Intoxicated with unbroken success, we have become too self-sufficient to feel the necessity of redeeming and preserving grace, too proud to pray to the God that made us!

Notably, Thomas Jefferson didn’t think that the government should declare a day of prayer. As The Houston Chronicle pointed out in 2010, Jefferson believed that prayer was not a government matter.

“Fasting and prayer are religious exercises; the enjoining them an act of discipline,” Jefferson wrote in 1808. “Every religious society has a right to determine for itself the time for these exercises, and the objects proper for them, according to their own particular tenets; and right can never be safer than in their hands, where the Constitution has deposited it.”

2. Billy Graham Inspired the Creation of the National Day of Prayer Law

The Rev. Billy Graham played an important role in making the National Day of Prayer a national observance recognized by Congress. According to the Graham website, when he led a worshiping service outside the U.S. Capitol, Graham famously said it would be great to see political leaders kneeling in prayer together.

“What a thrilling, glorious thing it would be to see the leaders of our country today kneeling before Almighty God in prayer. What a thrill would sweep this country,” Graham said. “What renewed hope and courage would grip the Americans at this hour of peril.”

The members of Congress then drafted a bill to make the National Day of Prayer official. Truman signed the bill in April 1952, just two months after Graham was in Washington.

Initially, the bill allowed presidents to chose the day they wanted to mark as National Day of Prayer. In 1988, President Ronald Reagan signed an amended version to make it fixed to the first Thursday of May.

3. There’s a Competing National Day of Reason Started by Secular Groups in 2003

“National Day of Reason”“National Day of Reason” This is a Fox News Report. The atheists want a “National Day of Reason” on the same day May 5th as the “National Day of Prayer.” America is godless nation. We have become so secular. Saints, pray for America and the leaders of our nation that are running our White House.”… 2016-05-05T15:32:34.000Z

In 2003, the American Humanist Association and the Washington Area Secular Humanists created the National Day of Reason, which is on the same day as the National Day of Prayer. The American Humanist Association has called on supporters to ask their local governments to declare Days of Reason. On April 26, 2017, a supporter succeeded in getting the Cedar Rapids, Iowa government to issue a Day of Reason proclamation.

In 2015, then-U.S. Rep. Mike Honda introduced a resolution to recognize a “National Day of Reason,” but the bill didn’t get past an introduction. Honda tried again in 2016, but still wasn’t successful.

“I introduced this resolution declaring May 5th, 2016 a National Day of Reason because the application of reason has proven to improve the conditions in which people live, offer hope for human survival on Earth, and cultivated intelligent, moral, and ethical behaviors and interactions among people,” Honda said in a 2016 statement. “I encourage everyone to take this occasion to reflect upon the way that philosophical principles developed during the Age of Reason influenced our Founding Fathers as they formed our country and how the employment of reason, critical thought, the scientific method, and free inquiry can help resolve human problems and improve the welfare of humankind.”

4. A Court Challenge to the National Day of Prayer Failed in 2011

In addition to the humanists and secular groups that came up with their own “National Day of Reason,” there have been challenges to the constitutionality of the National Day of Prayer. In 2008, the Freedom From Religion Foundation (FFRF) sued the federal government, claiming that the holiday broke the separation of church and state.

The case stayed alive until 2011, and stopped short of the Supreme Court. It ended in April 2011, when the three judges on the Seventh U.S. Circuit Court of Appeals ruled that they couldn’t sue the government. The FFRF argued that the presidential prayer proclamations caused them harm. The judges didn’t buy it.

“A feeling of alienation cannot suffice as injury,” the court ruled. As CBS News noted at the time, the judges wrote that the proclamation is a suggestion, not a demand. Chief Judge Frank Easterbrook noted that the president often does things that people do not agree with, either on political or religious grounds.

“The address is chiseled in stone at the Lincoln Memorial on the National Mall,” the opinion read. “An argument that the prominence of these words injures every citizen, and that the Judicial Branch could order them to be blotted out, would be dismissed as preposterous.”

5. There’s a National Day of Prayer Task Force That Oversees Evangelical Christian Observances

NationalDayOfPrayer.org isn’t actually a government website. It’s the official site of the National Day of Prayer Task Force, which is headquartered in Colorado Springs. The group is responsible for organizing Evangelical Christian events on the National Day of Prayer.

Founded in 1983, the group has been the target of criticism, from those who feel that they have excluded other faiths from the National Day of Prayer. The Jewish group JewsOnFirst.org and the Interfaith Alliance even called for an Inclusive Day of Prayer.

Each year, the task force sets a theme for the National Day of Prayer. The Gazette reports that the 2017 theme is “For Your Great Name’s Sake: Hear Us, Forgive Us, Heal Us,” which is inspired by a verse in the Book of Daniel.

“We want to emphasize the importance and value of prayer,” Keith Anderson, prayer pastor at First Baptist Church of Black Forest, told the Gazette. “It’s the lifeline and power that too many Christians do not avail themselves of. We’ve seen God do wonderful things – people recovering from accidents and medical emergencies, marriages healed, a number of things that have inspired our people to focus on prayer.”