In a $100 million rescue mission, NASA yesterday placed the Tracking and Data Relay Satellite in proper stationary orbit over northwest Brazil two months after it almost was lost when a rocket motor misfired and the 5,000-pound satellite wound up 8,700 miles off course.

Two thruster jets about the size of water faucets fired just after noon yesterday for almost six minutes, moving the satellite 23 miles upward so that the perigee (low point above the Earth) of its orbit matches its apogee (high point), which is 22,236 miles high. This allows it to move parallel to the Earth's rotation and at the same speed, which keeps it in the same position above Earth.

It was the 39th time the thrusters had been fired the last two months. They were never fired twice the same way or for the same length of time.

"We are in the proper orbit," James M. Beggs, NASA administrator, said at Goddard Space Flight Center in Greenbelt, where firing commands originated. "It's just super, a great day for NASA and a great day for all of us. This is one of those things you rarely get to do in your lifetime."

When the satellite left the cargo bay of the space shuttle Challenger in April, the first stage of a new two-stage rocket engine built for the Air Force fired perfectly, fell off from the satellite and the second stage fired flawlessly for 80 seconds. Then, the engine spun wildly out of control, throwing the satellite into a tumble that caused it to rotate 30 times a minute.

Less than 10 minutes before its batteries would have gone dead, the satellite received a command from Goddard to separate from the engine, which it did. The satellite's computer then ordered it to fire thrusters to stop tumbling and to deploy solar panels as an alternative to battery power.

That was just the start of the rescue mission.

Engineers at TRW Inc., which built the satellite, and Spacecom, which owns it, devised a scheme to get it into proper orbit by using six of the 24 tiny thruster jet nozzles, about the size of thimbles, that are built into the satellite to maintain its position in "geosynchronous" orbit 22,236 miles high. All satellites drift in space and the jets are to correct its orbit.

Normally, the satellite would carry only 250 pounds of fuel for station-keeping, more than enough to maintain it in orbit for the next 10 years but nowhere near enough for the firings needed to correct its errant course. This time, the satellite's fuel tanks were filled with 1,300 pounds of fuel to maintain ballast in space much as a ship at sea because this vehicle is so big and unwieldy with its solar panels and antennas. The tiny engines were fired for 44 hours of burn time the last two months in efforts to nudge the satellite higher each time. The biggest problem was to fire them in a manner that they would not overheat and burn holes in the fuel valves. The engines had to be shut down 12 times because they had reached their "red line" temperatures.

Saving the satellite means that the Spacelab mission on the ninth shuttle flight in September can proceed on schedule.

It means the Landsat satellite now in orbit can use the TDRS as a transmitter to send pictures back to Earth and that all future shuttle flights can begin to communicate with Earth as much as 85 percent of the time they are in orbit instead of the 20 percent that is possible now.