The crew of the space shuttle Columbia, beset by technical difficulties since the start of its five-day-old mission, nevertheless managed to secure a piece of space exploration history yesterday with the help of 28 Maryland middle- and high-school students.

The students, 15 eighth-graders from Gwynn Park Middle School in Prince George's County and 13 freshmen from Howard County's Atholton and Hammond high schools, received the first science lesson to be taught live from outer space as Columbia continued its 17,500-mile-per-hour orbit 200 miles above Earth.

For more than an hour, Columbia's astronauts piloted their rapt pupils, who were watching monitors at the Goddard Space Flight Center in Greenbelt, through the fundamentals of astrophysics and the lighter side of shuttle living.

"We're just sitting here for 4 1/2 hours, not moving, and they've been twice around the world in the same period. It's pretty boggling," said Jamie Cooke, 13, of Brandywine.

Payload specialist Samuel T. Durrance, a scientist at Johns Hopkins University, launched the lesson with a down-to-Earth demonstration on the electromagnetic spectrum and how being above the the planet's atmosphere allows astronauts to obtain information about the universe not available from the ground.

First, Durrance played a garbled recording of a song that he said had certain of its frequencies filtered out and asked the students if they recognized it. No one did. Durrance replayed the tape with those frequencies restored moments later, and to the delight of the class, it turned out to be the theme from "Star Wars."

"The universe is playing a kind of symphony of the light it produces," Durrance said. "You can hear some of the notes with a telescope . . . . We can see all the radiation up here in the shuttle."

Zero gravity also proved a big hit with the students. At one point, payload specialist Ronald A. Parise, a Burtonsville resident, spoke to the students while reclining on the shuttle's ceiling.

Mission specialist Jeffrey A. Hoffman, a career astronaut, drew an appreciative laugh from his students by sporting a necktie for the class. As Hoffman floated weightless inside Columbia, his necktie waved at the camera every time he moved.

"I remembered all the male teachers I had wore ties," Hoffman said. "No one I knew ever wore a tie in space, but I thought I would give it a try. You have to be a little bit careful with it, but overall it works quite nicely."

A lucky few students had the chance to pose questions to two crew members. Because the students had been preparing for yesterday's lesson since spring, most of their queries focused on the scientific benefits of Columbia's mission.

The students, who were selected to represent their schools on the basis of scientific aptitude, will be asked to prepare lessons and exhibits based on their experience.

"I couldn't even eat this morning, I was so excited," said Erin Tobias, 13, of Fort Washington, after she asked an astronaut about the studies being conducted with the powerful X-ray telescope that was built at Goddard. "It did seem like they were on the phone with me next door and not in space. I was suprised at how easy it was."