The US space agency believes it has traced the source of an air leak in space shuttle Endeavour's cabin.
The shuttle is scheduled to launch on 7 August
Engineers are working against the clock to remove and replace the suspect pressure-relief valve in order to prevent delay to the 7 August launch.
Endeavour's faulty valve is to be substituted with one taken from its sister spacecraft Atlantis.
Nasa said it expected the extra work would be completed by Tuesday, but admitted the timing would be tight.
The leak was discovered at the weekend. An initial attempt to fix it by tightening a loose bolt appeared to have worked, but tests on Monday showed that air was still escaping from the shuttle cabin.
Nasa engineers finally traced the source of the leak on Wednesday by testing the valves that control cabin pressure.
John Yembrick, a Nasa spokesman, said: "The leak has been isolated. It's a pressure-relief valve behind the toilet in the crew cabin."
Nasa said the valve would be replaced with an Atlantis equivalent on Thursday; the cabin will then needed to be tested again to check that it is air-tight.
If air is still escaping, the launch may need to be delayed.
"You can't launch with a cabin leak," said Nasa spokesman Kyle Herring.
Seven crew will fly on the mission to continue expansion of the International Space Station.
Endeavour will launch from Kennedy Space Center in Florida on its first flight in five years.
The countdown for the launch is due to begin Saturday at 2302 GMT.