Spacewalking astronauts installed new pumps on a cosmic ray detector outside the International Space Station in a bid to extend its scientific life.

It was the third spacewalk in nearly three weeks for Italy’s Luca Parmitano and Nasa’s Andrew Morgan.

One more spacewalk remains before Nasa can declare the alpha magnetic spectrometer successfully repaired.

The two billion US dollar spectrometer has been up there hunting for antimatter and dark matter for eight and a half years, longer than anticipated.

Without four new pumps for cooling, the device would be crippled and, ultimately, useless.

Nasa compared the series of four spacewalks, the most complex since the Hubble Space Telescope missions, with heart bypass surgery because they are designed to bypass the old, degraded pumps.

The two billion spectrometer was never meant for hands-on repairs like this and was designed to last just three years.

If the new plumbing holds, the instrument should last the entire life of the space station, or another five to 10 years.

Given the high stakes, Mission Control urged the spacewalkers to “take good care” of the pumps.

Mr Parmitano clutched the 350lb box of pumps, a bulky three and a half feet by two and a half feet, with both hands as he headed toward the spectrometer.

Mr Parmitano quickly attached the bundle to the spectrometer, then hooked up power and data cables.

He crossed his gloved fingers as best he could, and his booted toes, too, he noted, as flight controllers switched on power to the instrument.

The instrument came alive.

“Good news. We show that we can tear things apart and build them back up,” said Mr Morgan.

Mission Control cautioned, “We’ve got a little way to go yet, but we agree.”

Next was the spacewalkers’ toughest job: splicing eight stainless steel tubes that were cut on the November 22 spacewalk, into the new pumps.

Space Station
Italian astronaut Luca Parmitano, lower right, holds a bundle of new pumps (AP)

The astronauts hustled through the plumbing work and even squeezed in an extra chore, wrapping a thermal blanket onto the spectrometer.

They completed the spacewalk in six hours, quicker than planned.

“You guys crushed the timeline,” Nasa astronaut Christina Koch said from inside.

A fourth spacewalk is needed to check these reconfigured cooling lines for leaks and add more thermal insulation.

With two supply ships being readied for launch this week to the space station,  from Cape Canaveral and Kazakhstan,  it is uncertain when the final spacewalk will occur.

The spectrometer flew up on space shuttle Endeavour’s last mission in 2011.

It has since studied more than 148 billion charged cosmic rays.

Scientific operations will resume following the fourth and final spacewalk, provided the restoration is good.