A spacewalking astronaut successfully replaced a blurry camera outside the International Space Station on Friday, but had to contend with a misfunctioning jetpack and a frayed safety tether.
Both jetpacks and safety ties are crucial for preventing an astronaut from floating away.
Nasa said Joe Acaba was always securely attached to the orbiting outpost and never in any danger during the nearly seven-hour spacewalk.
But one of his tethers had to be replaced shortly after he and station commander Randy Bresnik floated outside.
Mission Control noticed the red lifeline was frayed and worn.
Mr Bresnik went back to the air lock to get Mr Acaba a spare.
Then five hours into the spacewalk, Mission Control saw that the right handle on Mr Acaba's emergency jetpack was open.
Mr Bresnik once more went to his crewmate's assistance, even offering some tape to keep it down.
After consulting for several minutes in Houston, flight controllers declared the jetpack unreliable and ordered Mr Acaba back inside, once he was finished greasing the new robot arm on the space station's big robot arm.
He finished the job, then headed in.
Mr Bresnik acknowledged things did not go as planned, "with all the stuff that happened today and the challenges we had".
But he thanked everyone for their hard work and diligence.
In the end, only a couple minor chores were left undone.
"Great work today," Mission Control radioed as the spacewalk came to a close.
It was the third spacewalk in two weeks for US astronauts.
Mr Bresnik went out on all three; he was accompanied by Mark Vande Hei to install the new robotic hand on October 5 and lubricate it on October 10.
Each spacewalker wears a jetpack for use in an emergency.
Approaching the 2.5 hour mark of today's spacewalk. A blown fuse has been replaced and a new hi-res definition camera has been installed. pic.twitter.com/CoyyITsQ2f— Intl. Space Station (@Space_Station) October 20, 2017
It is available in case an astronaut's multiple tethers fail and allows the spacewalker to fly back to the station.
It has been tested by orbiting astronauts, years ago, but never called into urgent action.
Earlier, Mr Acaba provided necessary focus to the space station's robot arm.
He unbolted a blurry camera from the new robotic hand installed two weeks ago.
He then popped in a spare, which flight controllers quickly tested from Houston.
The replacement provided crisp, clear views.
Sharp focus is essential when the space station's robot hand grabs an arriving supply ship and anchors it.
The next delivery is a few weeks away, prompting the quick camera swap-out.
Orbital ATK, one of Nasa's commercial shippers, plans to launch a cargo ship from Virginia on November 11.
Crew has transitioned to the Joint Airlock and are performing final cleanup. pic.twitter.com/MiYAgb4SyC— NASA Astronauts (@NASA_Astronauts) October 20, 2017
Mr Acaba and the station's commander, Randy Bresnik, were supposed to go spacewalking earlier this week.
But Nasa needed extra time to add the camera repair to their chores.
Friday's spacewalk, expected to be the last one for the year, also saw the astronauts installing a high-definition camera, replacing a fuse and removing thermal insulation from spare electronics.
Early next year, astronauts will replace the hand on the opposite side of the 58-foot robot arm, Canada's main contribution to the space station.
The original latching mechanisms are showing wear and tear since the arm's launch in 2001.
The 250-mile-high complex is currently home to three Americans, two Russians and one Italian.
A one-time high school and middle school teacher, Mr Acaba is the first astronaut of Puerto Rican heritage; his parents were born there.
He ventured out on Friday's spacewalk as the station soared above the hurricane-ravaged island, where much of his extended family lives.
"There's a whole line of people looking up and smiling today as you get ready to head out the door," Mr Bresnik told him.