Larger-than-usual crowds of well-wishers meant former President Jimmy Carter had to teach an extra Bible class at his rural Georgia church and a local schoolhouse on Sunday, after he announced on Thursday cancer had spread to his brain.
Carter, 90, a lifelong Baptist and church deacon, has taught Sunday school for decades, and the Maranatha Baptist Church in Plains, Georgia, is used to a throng.
The church's website asks people to line up before 9 am and attend an orientation before the 10 am class.
The theme of the lesson was love, Carter told the 300 people who filled the church's sanctuary, after briefly alluding to his health.
"We are studying the most important aspect of Christianity," he said, and read from the Sermon on the Mount in the Book of Matthew: "I say to you love your enemies and pray for those who persecute you."
He mentioned his conflict resolution work, including the Camp David peace agreement and negotiating a nuclear programme with North Korea, and said mediation can help resolve any conflict, be it between two countries or two people.
A smiling, comfortable-looking Carter, in a dark jacket and tie, spoke from the floor at the front of the room.
Carter taught a second Bible class to another crowd at a local school before returning to the church sanctuary to pose for photos with people for more than a half an hour.
Pictures on the Atlanta Journal Constitution and on social media showed dozens of people lining up outside the church in the rural town of Plains, where Carter lives with his wife. One held a fan with Carter's photograph on it.
The first person lined up at midnight and some followers drove hours to attend, local television reported.
Carter's grandson, former Georgia State Senator Jason Carter, tweeted that it was the 689th time that his grandfather had taught Sunday school at Maranatha. He teaches about 40 times a year.
Due to the security detail for the former president, everyone was searched going into the church.
Carter began radiation treatment for his cancer on Thursday, a week after announcing he had undergone surgery to remove a tumour from his liver.
Carter served as president from 1977 to 1981 and became active in humanitarian causes and monitoring elections after leaving office. He won the Nobel Peace Prize in 2002.