Astronaut Akihiko Hoshide completed his third spacewalk early Friday, successfully conducting repairs to the International Space Station, the Japan Aerospace Exploration Agency said.

For his two previous spacewalks, in August and September, Hoshide spent 14 hours and 45 minutes outside the ISS. The latest operation, which lasted six hours and 38 minutes, brought his total spacewalk time to 21 hours and 23 minutes, the most for a Japanese astronaut.

The record had been held by Soichi Noguchi, who spent 20 hours and five minutes outside the space station.

Hoshide and American Sunita Williams were tasked with fixing an ammonia leak. Ammonia is used to cool down power supply equipment. Failure to stop the leak would have caused the electricity supply to the ISS to be reduced by an eighth by the end of the year, JAXA said.

Hoshide is scheduled to return to Earth on Nov. 19 after spending about four months aboard the ISS.