CAPE CANAVERAL, Fla. (AP) _ An alarm went off inside space shuttle Endeavour's cockpit minutes before today's planned liftoff, forcing NASA to delay its first space station construction flight.

By the time launch controllers debated what was wrong and what to do about it, they ran out of time and Endeavour was grounded for another day. They missed the cutoff by only one to two seconds.

Launch director Ralph Roe, while disappointed, was convinced his team did the right thing. He said they would try again Friday.

``We want to err on the conservative side,'' Roe said. ``We don't want to launch with something we don't understand.''

The master alarm _ a pair of rectangular red lights _ began flashing about 4 1/2 minutes before the scheduled pre-dawn launch. Unsure of what caused it, shuttle managers counted down to the 31-second mark while discussing the problem.

Endeavour's pilots reported that the alarm went off right around the time the shuttle hydraulic power units were turned on. But launch controllers quickly determined that one of the three units had experienced a momentary dip in pressure, and so they counted down 12 more seconds before having to give up for the day.

``Please cut off,'' a launch controller urged his colleagues.

The six astronauts crawled out of the shuttle an hour later. Two threw up their hands.

``We'll try again another time,'' said commander Robert Cabana. He held up his left thumb and index finger a half-inch apart. ``We were that close.''

The one-day delay cost NASA about $600,000, mostly in fuel and overtime pay. ``It's an expensive turnaround, but that's part of the price we pay to be conservative and make sure that we don't have unsafe situations,'' said Donald McMonagle, a shuttle manager.

McMonagle said engineers would meet throughout the day to make sure they understood the fleeting drop in hydraulic pressure that set off the alarm.

NASA has only five minutes or less each day to launch Endeavour in order to meet up with the first space station part, launched two weeks ago by the Russians.

Aboard Endeavour is the second station component, an American-made connecting passageway named Unity. Once in orbit, the astronauts will use the shuttle robot arm to capture the Russian piece and attach it to Unity. Then, two astronauts will perform three spacewalks to hook up all the electrical connections and cables between the two cylinders.

Until the alarm flashed, it looked as though weather would be the culprit.

Rain and accompanying clouds moved in from the Atlantic 1 1/2 hours before liftoff. But the rain drifted away with minutes to spare and the clouds were judged by NASA to be scattered and thin enough for launch _ and then the alarm went off.

Secretary of State Madeleine Albright and other dignitaries from around the world had gathered in the drizzle to see Endeavour and its crew off following a year's delay caused by a cash crunch in Russia. Most were representatives of the 16 countries participating in the space station effort.

``This is a visionary idea,'' Albright told reporters. ``This is an investment in the future.''

The mission promises to be one of the most difficult in space shuttle history. And the entire space station project promises to be the most difficult undertaking since the Apollo moon landings nearly 30 years ago.

In all, more than 100 components weighing 1 million pounds are to be launched over the next five years, requiring 45 U.S. and Russian flights.