Miami (AFP) - The discovery of water in a US astronaut's helmet brought an early end Friday to the first ever galactic walkabout by his British colleague, astronaut Tim Peake, NASA said.

"A small water bubble" in American Tim Kopra's helmet led mission control to wrap up about two hours early out of an abundance of caution, NASA commentator Rob Navias said.

The situation brought back memories of a harrowing emergency in 2013 when Italian astronaut Luca Parmitano's helmet began rapidly filling with water and risked drowning him.

"This is nowhere near as severe as that incident was," said Navias, as he narrated Kopra's return to the airlock live on NASA television.

"The crew was never in any danger."

Kopra, 52, had reported a high carbon dioxide reading in his spacesuit earlier in the outing, but felt no symptoms, and mission control decided the alarm was due to a faulty sensor.

The liquid showed up about four hours into the six-and-a-half-hour spacewalk.

Kopra said the water, which tends to glob together in space, was about four inches long and two inches high (10 by five centimeters).

"The size was a concern," NASA chief astronaut Chris Cassidy said, after the crew was safely inside.

Peake checked his colleague's appearance while they were outside the International Space Station and described what he saw as a "film of water."

Kopra said it felt like cold water, indicating the leak may have come from a cooling loop inside the suit, said Navias.

Shortly after flight director Royce Renfrew at mission control learned of the dampness in Kopra's helmet, he decided to cut short the spacewalk.

By that time, the team's main mission -- to replace the broken voltage regulator -- had already been completed.

The spacewalk officially ended after four hours and 43 minutes.

NASA will examine the suit and the water to find out what went wrong.

Meanwhile, Parmitano, the Italian astronaut, wrote on Twitter that he was "happy" to see the two astronauts "safe inside. This is how I measure success: 1)crew-safe 2)main objective-completed."

Story continues

- Historic outing -

The outing was a big deal for Peake, the first Briton to walk in space.

Shortly after Peake climbed out of the space station to begin the spacewalk at 1248 GMT, American astronaut Scott Kelly positioned a camera from inside so that the British flag on the shoulder of Peake's spacesuit was visible to viewers watching live on NASA television.

"Great to see the Union flag out there," said Kelly.

"It's great to be wearing it," answered Peake. "It's a privilege."

Peake's job was to haul a bulky component called a sequential shunt unit, contained in a white bag as big as a suitcase.

He carried the unit, which would weigh 200 pounds (90 kilograms) on Earth, to the far end of the space station's truss, about 200 feet (60 meters) from the exit.

Kopra, who was making his third career spacewalk, toted the tools needed to remove the old unit and replace it with the new one.

The team's work was precisely timed to coincide with a nighttime pass of the space station to avoid sparks from any residual electrical current in the solar-powered equipment.

The ISS circles the Earth every 90 minutes, spending 31 of those minutes on each pass in the dark.

Peake said in a blog post Thursday he felt "exhilarated" about his upcoming spacewalk but had "no time to dwell on these emotions."

Following in the footsteps of Britain's Helen Sharman, who flew to the Russian Mir space station in 1991, Peake has drawn plenty of attention from his compatriots.

Among them was the Beatles legend Paul McCartney, who offered a message of "good luck" on Twitter.

"We're all watching, no pressure! Wishing you a happy stroll outdoors in the universe," McCartney wrote.