HOUSTON — If anything should happen to the Space Shuttle Atlantis once it reaches the international space station, or if the orbiter is deemed unsafe to return to Earth, NASA has developed an emergency plan to ensure that the shuttle’s four astronauts are not trapped in space.

In the unlikely event that Atlantis’ astronauts cannot return to Earth in their shuttle, they will remain on the space station until they can be brought home, over the course of a year, by a succession of Russian-built Soyuz spacecraft. The odds that this worst-case scenario will happen are very low, but the agency is required to prepare for all kinds of emergency situations, regardless of how remote they may be.

Since the STS-135 mission is the shuttle program’s last, NASA does not have another orbiter on the ground prepared to act as a rescue vehicle in the event of an emergency. The agency’s two other shuttles, Discovery and Endeavour, flew their final missions in February and May, respectively, and are in the process of being decommissioned in preparation for their display at museums around the country. As a result, NASA turned to its Russian partners to jointly devise an elaborate rescue plan, in the unlikely case that Atlantis’ astronauts find themselves without a ride home.

“Since Columbia we’ve had a very engaging program of inspection and the capability to rescue a crew in the event that the shuttle incurred some launch damage like Columbia did back in 2003,” STS-135 Commander Chris Ferguson said in a preflight interview. “Since there is no backup shuttle for this, we have to rely on alternate means to get the astronauts back, and that will be through the normal rotation of Soyuz vehicles that come up to deliver new crew members.”

Russia launches about four Soyuz spacecraft a year to the space station from the Baikonur Cosmodrome in Kazakhstan. The Soyuz typically carries three space flyers to the outpost in a rotation that aims to constantly replenish the station’s six-person crew.

If Atlantis is damaged irreparably, or if mission managers decide the vehicle is unsafe for re-entry to Earth’s atmosphere, the shuttle astronauts will remain at the space station and wait for the normal rotation of Soyuz vehicles to come up one by one.

“Instead of coming up with three people, however, they’ll come up with two, which will leave an empty space for one of the shuttle crew members to get back,” Ferguson said. “It’s a well-thought-out but lengthy rescue process.”

The potential length of such a rescue mission was a key driver in the decision to fly only four astronauts on the final shuttle flight. The last time NASA flew a four-person shuttle crew was Challenger’s STS-6 mission, which launched in April 1983.

Ferguson said that statisticians calculated the odds that such a rescue would need to take place as being 1 in 560.

As it has been worked out, STS-135 mission specialist Rex Walheim would return first, followed by Ferguson, mission specialist Sandra Magnus and pilot Doug Hurley. Walheim’s return to Earth would be approximately 80 days after being stranded in orbit, and the others would follow in succession, with the last astronaut, Hurley, returning after about 340 days, or nearly a year, at the space station.

“As I told my boss, Peggy Whitson, I said, ‘I think it’s a great deal. Nine months of training and I get to do a year on space station,’” Hurley said in a preflight interview. “I think it’s a bonus any way you look at it. The likelihood of that happening is very, very small, but we’ve got a great plan in place if we need to execute it.”

As part of their preparation for the mission, the four astronauts traveled to Russia for training with the Soyuz vehicle and to be fitted for Russian-built Sokol spacesuits. The STS-135 crewmembers also received preliminary lessons on various space station systems.

“We’ve had some basic training on big-picture emergency type scenarios,” Magnus said in a June 30 news briefing at NASA’s Johnson Space Center here. “The plan is, if we have an extended stay on the space station, we would get extended training on the station. There’s a very good plan in place, and we’ll be able to assimilate into space station life.”

If such a scenario were to take place, planners also needed to be sure that the space station had adequate resources and supplies to accommodate the extra people, and that after the shuttle astronauts’ departure, the station program could bounce back from the slight hiccup in its crew rotation schedule.

“By the December timeframe, we’re down to less than six crew, and the crew number stays below six for a while,” said Mike Suffredini, NASA’s space station program manager. “We made sure that, given the normal vehicle traffic that we can expect, that by the time we got the last crew person home, we could reconstitute up to six [residents].”

Furthermore, to help facilitate life on the space station, the order of the shuttle astronauts’ return was set for specific reasons. Magnus and Hurley were chosen to be the last two rescued because of their honed skills in robotics from their previous spaceflights, which could come in handy on the orbiting outpost.

“The order that the people were picked was key — I wasn’t sure whether to take that personally or not,” Ferguson joked.