Former U.S. President Jimmy Carter talked about his recent health setback and his conversation with President Donald Trump, as he returned to teaching Sunday school in Georgia for the first time since breaking his hip.

Carter told people gathered at the Maranatha Baptist Church in Plains that he and his wife, Rosalynn, have nursing care at home and are doing fine. He thanked those present for their prayers and good wishes.

The 94-year-old Carter broke his hip last month at his home when he fell while leaving to go turkey hunting. He subsequently had hip replacement surgery.

The former first lady also was hospitalized around the same time for what Carter said was initially thought to be a stroke, but turned out to be less serious.

A devout Christian, Carter regularly teaches Sunday school in Plains, drawing hundreds of visitors for each session. But he had to cancel plans to teach after hip surgery.

People began gathering at midnight to hear Carter, and by 8 a.m., a line wrapped around the church despite pouring rain, the Atlanta Journal-Constitution reported.

"We wanted to pay tribute for all of the work he has done," Glenda Morris-Robinson told the newspaper. "It is so wonderful to see a true servant leader. He was remarkable."

Morris-Robinson, a pediatrician from Atlanta, drove down with her daughter, Gabriella, who flew in from New York City just for the occasion.

Carter said he recently wrote to Trump to explain how the Carter administration had tried to address economic friction with Japan, and Trump called him.

"He was very gracious," Carter said, adding Trump expressed his appreciation for Carter's letter as well as admiration for the former president.

"The main purpose of his call was to say very frankly to me on a private line that the Chinese were getting way ahead of the United States in many ways," Carter said.

He said he told Trump the U.S. has been in constant war for years, spending trillions of dollars, while China has invested in projects such as high speed rail that benefit its people.

In March, Carter became the longest-living chief executive in U.S. history, exceeding the lifespan of former President George H.W. Bush, who died Nov. 30 at the age of 94 years, 171 days.

The milestone came despite a cancer diagnosis more than three years earlier. Carter disclosed in 2015 that he had melanoma that had spread to his liver and brain. He received treatment for seven months until scans showed no sign of the disease.