The rocket ship hit an altitude of 51 miles (82 kilometers) before beginning its gliding descent, said mission official Enrico Palermo. It landed on a runway minutes later.
"We made it to space!" Palermo said.
Thursday's supersonic flight takes Virgin Galactic closer to turning the long-delayed dream of commercial space tourism into reality. The company aims to take paying customers on the six-passenger rocket, which is about the size of an executive jet. Virgin Galactic founder Richard Branson has said he wants to be one of the first on board.
Branson greeted the two pilots after the test, declaring "Space is Virgin territory!"
Virgin Galactic considers 50 miles (80 kilometers) the boundary of space because that is the distance used by the U.S. Air Force and other U.S. agencies. That's different from a long-held view that the boundary is at 62 miles (100 kilometers). Virgin Galactic CEO George Whitesides noted that recent research favors the lower altitude.
Whitesides said a review of the flight's data will last into the new year, and there will be more test flights. He wouldn't estimate when commercial passenger trips might begin.
"This is a huge step forward and once we look at the data we'll see what that pathway is," he said.
At the start of the test flight, a special jet carrying the Virgin Space Ship Unity flew to an altitude near 43,000 feet (13,100 meters) before releasing the craft. The spaceship ignited its rocket engine and it quickly hurtled upward and out of sight of viewers on the ground. The spaceship reached Mach 2.9, nearly three times the speed of sound.
The two test pilots — Mark "Forger" Stucky and former NASA astronaut Rick "CJ" Sturckow — will be awarded commercial astronaut wings, said Federal Aviation Administration official Bailey Edwards.
"It was a great flight and I can't wait to do it again," said Sturckow, who flew on the space shuttle four times.
Virgin Galactic's development of its spaceship took far longer than expected and endured a setback when the first experimental craft broke apart during a 2014 test flight, killing the co-pilot.
More than 600 people have committed up to $250,000 for rides that include several minutes of weightlessness and a view of the Earth far below.
The endeavor began in 2004 when Branson announced the founding of Virgin Galactic in the heady days after the flights of SpaceShipOne, the first privately financed manned spacecraft that made three flights into space.
Funded by the late billionaire Paul G. Allen and created by maverick aerospace designer Burt Rutan, SpaceShipOne won the $10 million Ansari X Prize. The prize was created to kick-start private development of rocket ships that would make spaceflight available to the public.
When Branson licensed the SpaceShipOne technology, he envisioned a fleet carrying paying passengers by 2007, launching them from a facility in southern New Mexico called Spaceport America.
But there were significant setbacks. Three technicians were killed in 2007 by an explosion while testing a propellant system at Scaled Composites LLC, which built SpaceShipOne and was building the first SpaceShipTwo for Virgin Galactic.
Then, in 2014, SpaceShipTwo broke apart during a test flight by Scaled Composites when the co-pilot prematurely unlocked its unique "feathering" braking system and it began to deploy. The co-pilot was killed but the injured pilot managed to survive a fall from high altitude with a parachute.
During descent, the craft's twin tails are designed to rotate upward to slow it down, then return to a normal flying configuration before the craft glides to a landing on a runway.
New versions of SpaceShipTwo are built by a Virgin Galactic sister company and flight testing is now in-house. Its previous test flight reached 32 miles (52 kilometers).
Branson isn't alone in the space tourism business: Jeff Bezos' Blue Origin is planning to take space tourists on trips, using the more traditional method of a capsule atop a rocket that blasts off from a launch pad. SpaceX's Elon Musk recently announced plans to take a wealthy Japanese entrepreneur and his friends on a trip around the moon.