CAPE CANAVERAL, Fla. (AP) - A space capsule hurtled toward the moon Wednesday for the first time in 50 years, following a thunderous launch of NASA's mightiest rocket in a dress rehearsal for astronaut flights.

No one was on board this debut flight, just three test dummies. The capsule is headed for a wide orbit around the moon and then a return to Earth with a Pacific splashdown in about three weeks.

After years of delays and billions in cost overruns, the Space Launch System rocket roared skyward, rising from Kennedy Space Center on 8.8 million pounds (4 million kilograms) of thrust and hitting 100 mph (160 kph) within seconds. The Orion capsule was perched on top and, less than two hours into the flight, busted out of Earth's orbit toward the moon.

“It was pretty overwhelming,” said NASA Administrator Bill Nelson. ”We're going out to explore the heavens, and this is the next step.“

The moonshot follows nearly three months of vexing fuel leaks that kept the rocket bouncing between its hangar and the pad. Forced back indoors by Hurricane Ian at the end of September, the rocket stood its ground outside as Nicole swept through last week with gusts of more than 80 mph (130 kph). Although the wind caused some damage, managers gave the green light for the launch.

An estimated 15,000 people jammed the launch site, with thousands more lining the beaches and roads outside the gates, to witness NASA's long-awaited sequel to Project Apollo, when 12 astronauts walked on the moon from 1969 and 1972. Crowds also gathered outside NASA centers in Houston and Huntsville, Alabama, to watch the spectacle on giant screens.

The rocket rode a huge trail of flames toward space, with a half-moon glowing brightly and buildings shaking.

The liftoff marked the start of NASA's Artemis lunar exploration program, named after Apollo's mythological twin sister. The space agency is aiming to send four astronauts around the moon on the next flight, in 2024, and land humans there as early as 2025.

“For the Artemis generation, this is for you,” launch director Charlie Blackwell-Thompson called out, referring to all those born after Apollo. She later told her team: “You have earned your place in history.”

The 322-foot (98-meter) SLS is the most powerful rocket built by NASA, with more thrust than either the space shuttle or the mighty Saturn V that carried men to the moon. A series of hydrogen fuel leaks plagued the summertime launch attempts as well as countdown tests. A fresh leak erupted at a new spot during Tuesday night's fueling, but an emergency team tightened the faulty valve on the pad. Then a U.S. Space Force radar station went down, resulting in another scramble, this time to replace an ethernet switch.

“The rocket, it's alive. It's creaking. It's making venting noises. It's pretty scary,” said Trent Annis, one of the three men who entered the blast danger zone to fix the leak. “My heart was pumping. My nerves were going.”

Orion should reach the moon by Monday, more than 230,000 miles (370,000 kilometers) from Earth. After coming within 80 miles (130 kilometers) of the moon, the capsule will enter a far-flung orbit stretching about 40,000 miles (64,000 kilometers) beyond.

The $4.1 billion test flight is set to last 25 days, roughly the same as when crews will be aboard. The space agency intends to push the spacecraft to its limits and uncover any problems before astronauts strap in. The test dummies - NASA calls them moonikins - are fitted with sensors to measure such things as vibration, acceleration and cosmic radiation.

Nelson cautioned “things will go wrong” during this demo. A few minor issues cropped up early in the flight, although preliminary indications were the boosters and engines performed well.

“I personally am not going to rest well until we get safely to splashdown and recovery,” said mission manager Mike Sarafin.

The rocket was supposed to have made its dry run by 2017. Government watchdogs estimate NASA will have spent $93 billion on the project by 2025.

Ultimately, NASA hopes to establish a base on the moon and send astronauts to Mars by the late 2030s or early 2040s.

Many hurdles still need to be cleared. The Orion capsule will take astronauts only to lunar orbit, not the surface.

NASA has hired Elon Musk's SpaceX to develop Starship, the 21st-century answer to Apollo's lunar lander. Starship will carry astronauts back and forth between Orion and the lunar surface, at least on the first trip in 2025. The plan is to station Starship and eventually other companies' landers in orbit around the moon, ready for use whenever new Orion crews pull up.

Reprising an argument that was made during the 1960s, Duke University historian Alex Roland questions the value of human spaceflight, saying robots and remote-controlled spacecraft could get the job done more cheaply, efficiently and safely.

“In all these years, no evidence has emerged to justify the investment we have made in human spaceflight - save the prestige involved in this conspicuous consumption,” he said.

NASA is waiting until this test flight is over before introducing the astronauts who will be on the next one and those who will follow in the bootsteps of Apollo 11′s Neil Armstrong and Buzz Aldrin.

Most of NASA's corps of 42 active astronauts and 10 trainees were not even born yet when Apollo 17 moonwalkers Gene Cernan and Harrison Schmitt closed out the era, 50 years ago next month.

“We are jumping out of our spacesuits with excitement,” astronaut Christina Koch said before the launch.

After a nearly yearlong International Space Station mission and all-female spacewalk, Koch, 43, is on NASA's short list for a lunar flight. So is astronaut Kayla Barron, 35, who finally got to witness her first rocket launch, not counting her own a year ago.

“It took my breath away, and I was tearing up,” Barron said. “What an amazing accomplishment for this team.”