NASA space shuttle Endeavour has left the International Space Station for the last time late Sunday and is headed home ending nearly two weeks of joint flight. Endeavour is being retired by NASA after this mission.

At 4:38 am EDT, Endeavour fired its jets to complete the final separation from the International Space Station, setting it on its course for return to Earth Wednesday, June 1. The shuttle will begin to increase its distance behind the station with each trip around Earth, NASA said in a statement.

The shuttle delivered the station's leading science experiment -- the $2 billion Alpha Magnetic Spectrometer particle detector -- and a pallet of spare parts that is planned to tide over the orbital station after the shuttle program ends.

During its 12 days at the outpost, the Endeavour crew was able to complete construction of the U.S.-side of the $100-billion outpost and undertook four spacewalks.

NASA said the shuttle's re-rendezvous with the space station for the Sensor Test for Orion Relative-navigation Risk Mitigation (STORRM) was completed as planned, with Commander Mark Kelly flying Endeavour to an approach within about 950 feet of the station as the systems visual navigation system was tested.

Endeavour is due to be back at 2:35 am EDT on June 1, at the Kennedy Space Center in Florida, the same day when Atlantis is scheduled to reach the launch pad for NASA's 135th and final flight.

One last shuttle mission is planned before the 30-year-old shuttle program ends. Atlantis, the only shuttle flight is due to be launched by July 8 with a year's worth of supplies for the station, in case the commercial companies delay their new vehicles.

Endeavour's next 'mission' will be attracting guests to the California Science Center museum in Los Angeles. NASA Administrator General Charles Bolden announced April 12 that Endeavour will be decommissioned and go to the California Science Center for permanent display.

The Endeavour will provide an educational platform for the public to celebrate California’s long time leadership in science, technology, mathematics and engineering. We are confident that it will serve to motivate and inspire millions of young people to dream about possibilities and will attract and engage the next generation of California’s and our nation’s workforce in these fields, California Science Center President Jeffrey Rudolph said in a statement.

Take a glimpse of Endeavour departing from the International Space Station: