US Vice-President Kamala Harris became the first woman to - briefly - be given presidential powers while Joe Biden underwent a regular health check.
Ms Harris, 57, was in control for 85 minutes, while Mr Biden was placed under anaesthesia for a routine colonoscopy on Friday.
Mr Biden's doctor released a statement after the operation, saying he was healthy and able to execute his duties.
The medical examination came on the eve of the president's 79th birthday.
Ms Harris carried out her duties from her office in the West Wing of the White House, officials said.
She is the first woman - and the first black and South Asian American - to be elected US vice-president.
White House Press Secretary Jen Psaki said the temporary transfer of powers in such circumstances was not unprecedented, and that it was part of the process set out in the US constitution.
"As was the case when President George W Bush had the same procedure in 2002 and 2007," she said in a statement.
The president was seen smiling as he returned to the White House. "I feel great," he said.
"President Biden remains a healthy, vigorous, 78-year-old male, who is fit to successfully execute the duties of the president," said Kevin O'Connor, the president's physician.
Kevin O'Connor, the president's physician, said the colonoscopy found a "benign-appear polyp" that was easily removed.
Mr O'Connor added that the president's gait also appeared "perceptibly stiffer and less fluid," than in the past. This was attributed to wear and tear of the spine.
Mr Biden, the oldest US president to take office, had his last full medical examination in December 2019.
At the time, his doctor released a medical report describing him as "healthy, vigorous" and "fit to successfully execute the duties of the presidency".