Former President Jimmy Carter became dehydrated on Thursday and was taken to a hospital in Canada, where he has been leading his annual Habitat for Humanity building project.

The Carter Center, the nonprofit organization that Mr. Carter and his wife, Rosalynn, founded, said in a statement that the former president had gone to a hospital in Winnipeg, Manitoba, “as a precaution.” The center did not say when it expected Mr. Carter, 92, to be released, but it added that he was receiving “rehydration.”

The Canadian Broadcasting Corporation reported that Mr. Carter collapsed after about an hour of work on Thursday, when he was cutting wood. The CBC reported that an ambulance left the work site soon after, followed by Mr. Carter’s motorcade.

“President Carter was dehydrated working in the hot sun,” Jonathan Reckford, Habitat for Humanity International’s chief executive, said later.

Mr. Carter was treated in 2015 for cancer in his liver and brain, which doctors detected when they removed a mass from his liver. Mr. Carter acknowledged then that he briefly “thought I had a few weeks left,” but he received treatment in Atlanta and recovered.

Although he has been out of elected office for 36 years, he maintains a robust schedule and remains a prominent figure in American public life. He regularly teaches Sunday school at his church in Plains, Ga., is a faculty member at Emory University in Atlanta and often travels with the Carter Center. In February, Mr. Carter attended the opening of a solar farm on his land in Plains.

He has a longstanding relationship with Habitat for Humanity; this week’s trip was the 34th time that the Carters have worked with the group since Mr. Carter left office. According to Habitat for Humanity, the Carters have worked with more than 92,000 other volunteers on nearly 4,000 homes worldwide.

At a news conference in August 2015, when he detailed his cancer diagnosis and treatment plans, Mr. Carter said he hoped to travel that autumn to Nepal for a Habitat build. The trip was ultimately canceled because of unrest in the country.