This Dec 6, 2018 image made available by NASA shows the InSight lander. (NASA VIA AP)

LOS ANGELES – NASA has formally retired its Mars InSight lander, the first robotic probe specially designed to study the deep interior of a distant world, four years after it arrived on the surface of the red planet, the US space agency announced on Wednesday.

Mission controllers at NASA's Jet Propulsion Laboratory (JPL) near Los Angeles determined the mission was over when two consecutive attempts to re-establish radio contact with the lander failed, a sign that InSight's solar-powered batteries had run out of energy.

InSight landed on Mars in late November 2018 with instruments designed to detect planetary seismic rumblings never before measured anywhere but Earth, and its original two-year mission was later extended to four

NASA predicted in late October that the spacecraft would reach the end of its operational life in a matter of weeks due to increasingly heavy accumulations of dust on its solar panels, depleting the ability of its batteries to recharge.

ALSO READ: NASA to conduct first global water survey from space

JPL engineers will continue to listen for a signal from the lander, just in case, but hearing from InSight again is unlikely, NASA said. The three-legged stationary probe last communicated with Earth on Dec 15.

InSight landed on Mars in late November 2018 with instruments designed to detect planetary seismic rumblings never before measured anywhere but Earth, and its original two-year mission was later extended to four.

From its perch in a vast and relatively flat plain called Elysium Planitia just north of the planet's equator, the lander has helped scientists gain new understanding of Mars' internal structure.

ALSO READ: NASA's Orion capsule returns to Earth after moon mission

Researchers said InSight's data revealed the thickness of the planet's outer crust, the size and density of its inner core and the structure of the mantle that lies in between.

One of InSight's chief accomplishments was establishing that the red planet is, indeed, seismically active, recording more than 1,300 marsquakes. It also measured seismic waves generated by meteorite impacts.

"The seismic data alone from this discovery program mission offers tremendous insights not just into Mars but other rocky bodies, including Earth," said Thomas Zurbuchen, associate administrator of NASA's science mission directorate.

ALSO READ: NASA to make 2nd attempt at debut moon rocket launch on Sat

One such impact a year ago was found to have gouged boulder-sized chunks of water ice surprisingly close to Mars' equator.

Even as InSight retires, a more recent robotic visitor to the red planet, NASA's science rover Perseverance, continues to prepare a collection of Martian mineral samples for future analysis on Earth.

This week, Perseverance deposited the first of 10 sample tubes it was directed to leave at a surface collection site on Mars as a backup cache, in case the primary supply stored in the rover's belly cannot for some reason be transferred as planned to a retrieval spacecraft in the future, NASA said.