Defective software could have doomed Boeing's crew capsule during its first test flight that ended up being cut short late last year, NASA said Friday.

The Starliner capsule launched without astronauts in December, but its automatic timer was off by 11 hours, preventing the capsule from flying to the International Space Station as planned.

In addition, a software problem with the Starliner's service module was not detected until the flight was underway, according to NASA.

That would have interfered with the separation of the service module before touchdown.

If ground controllers had not intervened to fix the problems, NASA said the Starliner could have been destroyed.

The aborted mission marked another major setback for aerospace giant Boeing, which is in the midst of a safety crisis over a software glitch that led to the grounding of its 737 MAX after two deadly crashes.

The Boeing Starliner spacecraft is seen above on December 22, shortly after it landed in White Sands, New Mexico after its first test flight

The capsule was placed on top of a United Launch Alliance Atlas V rocket which lifted off from Cape Canaveral, Florida, on December 20

The Starliner capsule is seen above in an artist rendering before its first ever test flight in December

These latest findings stem from a joint investigation team formed by NASA and Boeing in the wake of the aborted test flight.

The capsule ended up in the wrong orbit and returned to Earth two days later, parachuting down to a landing in New Mexico.

NASA has yet to decide whether Boeing must conduct another test flight without a crew, before putting astronauts on board.

Just in case, Boeing reported last week that it took a $410million charge in its fourth-quarter earnings, to cover a possible mission repeat.

'It remains too soon to speculate about next flight dates,' Boeing said in a statement.

The investigation team found that 'critical software defects' weren't detected before the flight 'despite multiple safeguards,' NASA said in a statement.

The breakdowns in designing, coding and testing the software will require 'systemic corrective actions.'

The team also looked into a third problem, an intermittent space-to-ground communication problem that hampered controllers' ability to command and manage the capsule.

Additional testing is underway to determine how and why all these breakdowns occurred.

NASA said the review should be completed by the end of February.

Boeing said it already is working on many of the fixes.

The December mission was supposed to be the company's last major hurdle before launching the first Starliner crew.

A second private company, SpaceX, is on track to launch astronauts for NASA as early as this spring.

SpaceX successfully completed a launch abort test last month at Cape Canaveral.

Rosie the Rocketeer, an astronaut test dummy (pictured), was the only occupant of the test flight that failed in its bid to dock with the International Space Station

The target for the Starliner was the International Space Station. It was due to dock and remain for a week before flying back to Earth

NASA says the actual take off from Cape Canaveral 'went perfectly' and the problems didn't start until the Starliner had separated from the Atlas V rocket (pictured on the launch pad)

NASA astronauts have not launched from home soil since the space shuttle program ended in 2011, instead riding Russian rockets to get to the space station.

The Soyuz seats go for tens of millions of dollars apiece.

NASA has been paying billions of dollars to Boeing and SpaceX to develop capsules capable of transporting astronauts to and from the space station.

That effort is years behind schedule.

After seeing this first test flight cut short and the space station docking canceled because of an improperly set clock on the capsule, Boeing employees were relieved to get the Starliner back.

It was the first American-made capsule designed for astronauts to make a ground landing after returning from orbit.

NASA's early crew capsules — Mercury, Gemini and Apollo — all had splashdowns.

SpaceX's Dragon capsule, which made its orbital debut last winter, also aims for the ocean at mission's end.

Boeing had been shooting for its first astronaut mission in the first half of 2020. This capsule is supposed to be recycled for the second flight with crew.

Despite its own setbacks, SpaceX remains in the lead in NASA's commercial crew program.

Boeing appears to be losing ground to SpaceX in the race to fly astronauts into space. Elon Musk's company launched a Falcon 9 spacecraft on January 19 as part of a successful test of an emergency abort system

The rocket engines deliberately shut down and the booster was destroyed in a fiery explosion

Falcon 9 released the Dragon Crew capsule (pictured) into the atmosphere before the rocket engines deliberately shut down

Flights controllers at SpaceX's California headquarters excitedly cheered at the accomplishment once the Dragon Crew capsule safely landed off the Florida Space Coast

Elon Musk's venture completed a vital launch on January 19 by successfully sending an emergency abort system test above Cape Canaveral and into the Atlantic Ocean.

A Falcon 9 rocket blasted off from Kennedy Space Center at 10.30am at normal procedure, but just one minute into flight the Dragon Crew capsule's engines ignited and sent it flying away from the booster.

Thrusters on the capsule propelled it out of harm's way just before the rocket engines deliberately shut down and the booster was destroyed in a fiery explosion.

The capsule reached a promising 27 miles before parachuting into the ocean just offshore of the Florida Space Coast, marking the nine-minute test flight as triumphant.

Two mannequins were used as pseudo passengers for this launch, but next time two NASA astronauts are expected to climb aboard.

Flights controllers at SpaceX's California headquarters excitedly cheered at the accomplishment, as the test is sign of working safety protocols.

'That's the main objective of this test, is to show that we can carry the astronauts safely away from the rocket in case anything's going wrong,' said Benji Reed, SpaceX's director of crew mission management.'

'This test is very important to us...a huge practice session,' he added.

Musk spoke out about Sunday's launch, saying: 'Dragon high altitude, supersonic abort test is a risky mission, as it's pushing the envelope in so many ways.'