WASHINGTON — The White House said Saturday morning that the first lady, Melania Trump, had returned home after spending almost five days at Walter Reed National Military Medical Center recovering from a procedure for a kidney condition.

In a statement, Mrs. Trump’s communications director, Stephanie Grisham, said the first lady was “resting comfortably and remains in high spirits.”

The president, who visited the military hospital three times this past week, wrote on Twitter: “Great to have our incredible First Lady back home in the White House. Melania is feeling and doing really well. Thank you for all of your prayers and best wishes!”

After a procedure on Monday, the White House said Mrs. Trump would probably remain at Walter Reed “for the duration of the week.” The next day, President Trump said the recovery would be “two or three days.” But on Friday, as that time frame expired, the West Wing and Mrs. Trump’s office would not comment on the first lady’s whereabouts, leading to speculation about the seriousness of her condition.