The space shuttle Challenger, its brilliant liftoff turning nighttime into day, carried five men into space early this morning to start a six-day mission marking several firsts for America's space program.

Included in the crew of this eighth shuttle launch were the nation's first black astronaut to fly into space and its oldest astronaut. No other shuttle has lifted off in darkness nor landed in it, as Challenger is expected to do next Monday.

After thunderstorms and vivid lightning moved away from nearby beaches and out to sea shortly before midnight, Challenger's two solid-rocket boosters and three main engines provided their own spectacular light show as it rose from Launch Pad 39A at 2:32 a.m., 17 minutes after the planned liftoff time.

Trailing the 110-ton spaceliner was a long, brilliant tail of orange flame that, under optimum conditions, may have been visible in several states and for about 500 miles, as far north as South Carolina and beyond Cuba to the south.

Police in the space center area said the crowd gathered to watch the liftoff was much smaller than those at previous shuttle launches.

For almost three hours before the crew finished entering the shuttle at 12:15 a.m., flight directors were concerned that the thunderstorms, which moved as close as five miles from the launch pad, might further delay the mission.

If lightning is sighted within five miles of the pad, launch directives state clearly that liftoff is to be postponed along with loading of the explosive hydrogen and oxygen fuels that power the shuttle's main engines. Lightning rods protected Challenger and its launch pad.

"We got hit by lightning once before, on the liftoff of Apollo 12 in 1969," shuttle program director Glynn S. Lunney said Monday at a pre-launch news conference, referring to the second moon landing mission. "That's why we don't launch that way anymore."

Commanding this third flight by Challenger is Navy Capt. Richard H. Truly, copilot of the second shuttle mission two years ago.

Truly's crew mates are pilot Daniel C. Brandenstein, a Navy commander, and three mission specialists: Navy Lt. Cmdr. Dale A. Gardner, civilian physician William E. Thornton and Air Force Lt. Col. Guion Steward Bluford II.

Bluford is the nation's first black in space, while Thornton, 54, is the oldest American in space.

A U.S.-manned spacecraft first left Earth at night Dec. 7, 1972, when Apollo 17 lifted off here for the moon shortly after midnight. That liftoff was visible to residents of the Great Smoky Mountains, more than 500 miles from away.

This mission is a night flight for three reasons:

* Challenger is carrying in its cargo bay a $43 million satellite for the government of India that is to forecast India's weather, broadcast radio and television and carry telephone calls to and from as many as 100,000 cities and villages throughout the Indian subcontinent. To be positioned properly over India near the Equator, the satellite must be launched in space in the middle of the night about 25 hours after liftoff.

The complexities of orbital mechanics and Earth's rotation dictate that the shuttle be launched at night if the satellite is to be located correctly.

* NASA wants to demonstrate that it can launch a shuttle at night, particularly from the Kennedy Space Center, where the weather is frequently more favorable at night than in the daytime.

* Perhaps most important, the Pentagon, the shuttle's major customer in years ahead, wants NASA to demonstrate night launches because it may want to use the shuttle on a military mission on short notice. "We don't want to be restricted to just daytime operations," Air Force Lt. Gen. James A. Abrahamson, associate administrator of NASA, said recently. "We want to be able to operate without any launch restraints, if possible."

Challenger's landing is planned for 3:23 a.m. EDT Monday at Edwards Air Force Base in California's Mojave Desert.

That would be the first planned night landing attempted by a manned spacecraft, and is scheduled for some of the same reasons that the night launch is being made.

Not only does NASA want to demonstrate that the shuttle is capable of landing in darkness, but the Pentagon also wants a demonstration of such landings, in part because it may need to end one of its future missions hurriedly.

NASA's main interest in such landings is the tendency of Florida weather to be more suitable at night.

While most future shuttle flights are to lift off and land here, this first night landing is targeted for California because Edwards Air Force Base has a longer runway than the Kennedy Space Center and there is greater probability of better weather there at this time of year.

The space agency is concerned that shuttle pilots may need more room to land Challenger the first time they attempt a night descent.

Although next Monday's landing would be the seventh of a shuttle at Edwards, this will be the first time the public will not be allowed to witness a shuttle landing there.

NASA is concerned that hundreds or even thousands of moving automobiles with headlights might confuse shuttle pilots Truly and Brandenstein as they glide Challenger out of total darkness on instruments toward the base's main concrete runway at a landing speed of more than 300 mph. Even though the runway is lit by brilliant xenon lights, the parking lights of many automobiles could confuse the pilots.