Hillary Clinton briefly appeared unsteady on Sunday during a ceremony marking the 15th anniversary of the Sept. 11 attack. Her physician later said Mrs. Clinton is being treated for pneumonia and dehydration.CreditCreditEric Thayer for The New York Times

Hillary Clinton is being treated for pneumonia and dehydration, her doctor said on Sunday, hours after she abruptly left a ceremony in New York honoring the 15th anniversary of the Sept. 11 attacks and had to be helped into a van by Secret Service agents.

The incident, which occurred after months of questions about her health from her Republican opponent, Donald J. Trump, and his campaign, is likely to increase pressure on Mrs. Clinton to address the issue and release detailed medical records, which she has so far declined to do.

Mrs. Clinton was taken from the morning event at ground zero to the Manhattan apartment of her daughter, Chelsea. About 90 minutes after arriving there, Mrs. Clinton emerged from the apartment in New York’s Flatiron district. She waved to onlookers and posed for pictures with a little girl on the sidewalk.

“I’m feeling great,” Mrs. Clinton said. “It’s a beautiful day in New York.”

Mrs. Clinton left in her motorcade without the group of reporters that is designated to travel with her in public. A campaign spokesman, Nick Merrill, indicated that she had returned to her Chappaqua, N.Y., residence sometime after 1 p.m., and Mrs. Clinton was not seen publicly the rest of the day.

But just after 5 p.m., a campaign official said Mrs. Clinton’s physician, Dr. Lisa R. Bardack, had examined the candidate at her home in Chappaqua, and Dr. Bardack said in a statement that Mrs. Clinton was “rehydrated and recovering nicely.”

“Secretary Clinton has been experiencing a cough related to allergies,” Dr. Bardack’s statement said, adding that on Friday morning, after a prolonged cough, Mrs. Clinton was given a diagnosis of pneumonia.

“She was put on antibiotics, and advised to rest and modify her schedule,” Dr. Bardack added. “At this morning’s event, she became overheated and dehydrated.”

Dr. Bardack did not indicate what sort of pneumonia Mrs. Clinton had or elaborate on the nature of the examination last week, whether Mrs. Clinton had a fever today, or a host of other issues that could offer more precise insights about her condition.

Late Sunday night, Mrs. Clinton’s campaign said she was canceling her plans to travel to California on Monday for what had been a planned two-day trip there.

Image

Hillary Clinton as she left her daughter Chelsea’s apartment in New York on Sunday.CreditEric Thayer for The New York Times

A video of Mrs. Clinton taken by an attendee at the ceremony captured what appeared to be her legs buckling as she struggled to steady herself and walk to her van. She required assistance from two Secret Service agents, who held her on either side, to move off a curb and into the van.

Close-up images revealed that her feet were dragging as she was hoisted into the vehicle.

The episode thrust questions about Mrs. Clinton’s health and the transparency of her campaign squarely into the last two months of the race, which many polls show has grown tighter. For months Republicans have, with scarce evidence, questioned the stamina of Mrs. Clinton, 68, and claimed she is ill, often pointing to her repeated coughing bouts.

She has brushed off such claims. Mrs. Clinton and Mr. Trump, 70, have shared substantially less information about their health than some previous presidential candidates.

And Mrs. Clinton revealed that she had pneumonia and had been prescribed medication only after the startling video emerged of her being unable to walk under her own volition after the ceremony.

Her campaign initially did not offer any information about why she had left early or her whereabouts. Twice during the day, she abandoned the group of reporters assigned to cover her public movements. Campaign officials did not respond to multiple inquiries about whether Mrs. Clinton had been treated by a doctor or had taken any medications.

Even some members of Mrs. Clinton’s campaign staff had been unaware of her recent diagnosis. Huma Abedin, Mrs. Clinton’s long-time aide, sent an email to the full campaign staff on Sunday that included the doctor’s note, to share with them “the full picture.”

“Onward as H.R.C. would say,” Ms. Abedin wrote in the message, the contents of which were disclosed by a Clinton aide who requested anonymity to share an internal campaign email.

Temperatures were in the high 70s on Sunday morning in New York, and humidity was high. Mr. Trump also attended the ceremony, as did many other dignitaries.

Other attendees at the event said afterward that Mrs. Clinton had not appeared ill when she first arrived at the former site of the World Trade Center.

“She seemed fine,” said Representative Peter T. King of New York, a Republican, who recalled speaking briefly with Mrs. Clinton around 8:30 a.m.

But about an hour later there was a minor commotion, Mr. King said. A number of New York’s current and former elected officials had been standing in silence as the names of the victims of the attacks were read. Suddenly, Mrs. Clinton, a former New York senator, left her position.

Mrs. Clinton emerged last week from an August mostly focused on private fund-raisers with campaign events in Ohio, Illinois, Florida, North Carolina and Missouri. On Wednesday, she participated in an NBC forum on national security, and on Friday she attended a Manhattan fund-raiser where she characterized half of Mr. Trump’s supporters as a “basket of deplorables.”

The candidates had taken their advertisements off the air to honor the anniversary of the Sept. 11 attacks, and Mr. Trump said nothing when he was asked on Sunday about Mrs. Clinton’s condition.

But he and his supporters have aggressively sought to raise questions about Mrs. Clinton’s health in recent months. Mr. Trump has highlighted her recurring cough and wrote on Twitter last month that “both candidates” should “release detailed medical records.” (Mr. Trump has issued only a limited summary of his health.)

Questions about the health of presidential hopefuls are hardly new to this campaign, but long before the exacting scrutiny of the modern media environment, campaigns were often able to suppress information about the ailments of candidates. Rumors about Franklin D. Roosevelt’s health, for example, pervaded his final presidential campaign in 1944, but he campaigned vigorously and his aides kept the extent of the heart disease that would kill him the following year out of the news.

More recently, Ronald Reagan, Bob Dole and Senator John McCain, each of whom was the Republican presidential nominee while in his 70s, faced questions about their physical condition.

“The physical demands of running for president, even with private planes and Secret Service protection, are more difficult than the mental demands,” said Scott Reed, who managed Mr. Dole’s 1996 campaign.

Short on particulars like heart rate, cholesterol level or family history, it described Mr. Trump in laudatory terms, saying that he would be “the healthiest individual ever elected to the presidency.”

The physician, Dr. Harold Bornstein, later told NBC News that he had written the statement in five minutes while a black car waited outside his office to collect it.

Mrs. Clinton’s campaign has tried to bat away rumors about her health, including releasing a letter from Mrs. Clinton’s doctor saying she was in “excellent health.” But aides have dismissed such questions as a way to distract from the issue of Mr. Trump’s not releasing his tax returns.

In July 2015, Mrs. Clinton issued a detailed two-page letter from her physician that included a concussion she sustained in 2012, while she was secretary of state; it left her with a blood clot in her head and double vision. Dr. Bardack, Mrs. Clinton’s physician, said those symptoms had been resolved within two months.

The candidate’s husband, Bill Clinton, however, has said that she “required six months of very serious work to get over” the concussion — a statement that helped feed conspiracy theories among Republicans that the injury was worse than initially disclosed, though there is no medical evidence to support those theories.

Asked whether she was concerned that such questions about her health would affect the election, as the polls have tightened, Mrs. Clinton told reporters on her campaign plane last week: “I’m not concerned about the conspiracy theories. There are so many of them, I’ve lost track of them.”