(CNN) A spaceship sucessfully zipped by Earth on Friday and used our planet's gravity to help it pick up speed on its way to explore an asteroid.

The maneuver, called an Earth gravity assist, pointed the spacecraft in the right direction to match Asteroid Bennu's path and speed, NASA said in a statement.

As a result of the flyby, NASA said the velocity change to the spacecraft was 8,451 miles per hour (3.778 kilometers per second).

"The Earth gravity assist is a clever way to move the spacecraft onto Bennu's orbital plane using Earth's own gravity instead of expending fuel," the mission's principal investigator, Dante Lauretta, said earlier in a statement.

While OSIRIS-REx was making its flyby, mission scientists at the University of Arizona tested its instruments and used the spacecraft's camera to take pictures of the Earth and moon.

Photos: OSIRIS-REx will take a sample of asteroid Bennu and return it to Earth Photos: OSIRIS-REx will take a sample of asteroid Bennu and return it to Earth OSIRIS-REx pulled within 12 miles of the diamond-shaped space rock Monday, December 3. Hide Caption 1 of 13 Photos: OSIRIS-REx will take a sample of asteroid Bennu and return it to Earth An artist's concept of what the OSIRIS-REx spacecraft will look like as it orbits asteroid Bennu. Hide Caption 2 of 13 Photos: OSIRIS-REx will take a sample of asteroid Bennu and return it to Earth OSIRIS-REx sits on top of its launch vehicle, a United Launch Alliance Atlas V rocket, after it was rolled to the launch pad at Cape Canaveral on September 7, 2016. Hide Caption 3 of 13 Photos: OSIRIS-REx will take a sample of asteroid Bennu and return it to Earth This drawing shows an artist's concept of what it will look like when the OSIRIS-REx spacecraft briefly touches asteroid Bennu with its robot arm to grab a sample of the asteroid. Hide Caption 4 of 13 Photos: OSIRIS-REx will take a sample of asteroid Bennu and return it to Earth OSIRIS-REx will spend two years mapping and scanning Bennu before taking a sample of the asteroid and flying it back to Earth. Hide Caption 5 of 13 Photos: OSIRIS-REx will take a sample of asteroid Bennu and return it to Earth The OSIRIS-REx spacecraft is sealed inside its protective payload fairing as it sits atop a rocket at Space Launch Complex 41 on Cape Canaveral Air Force Station in Florida on September 2. Hide Caption 6 of 13 Photos: OSIRIS-REx will take a sample of asteroid Bennu and return it to Earth The OSIRIS-REx spacecraft, enclosed in its protective shell, is lifted and examined by workers on August 29 at Cape Canaveral Air Force Station in Florida. Hide Caption 7 of 13 Photos: OSIRIS-REx will take a sample of asteroid Bennu and return it to Earth The OSIRIS-REx spacecraft is sealed inside a two-piece payload fairing on August 24. The fairing will protect it during launch. Hide Caption 8 of 13 Photos: OSIRIS-REx will take a sample of asteroid Bennu and return it to Earth The OSIRIS-REx arrives at Kennedy Space Center on an Air Force C-17 aircraft. The spacecraft was shipped in this huge container from Lockheed Martin's facility near Denver. The spacecraft arrived at Kennedy on May 20. Hide Caption 9 of 13 Photos: OSIRIS-REx will take a sample of asteroid Bennu and return it to Earth The OSIRIS-REx spacecraft was built by Lockheed Martin Space Systems Company in Denver. It is 20.25 feet in length (6.2 meters) with its solar arrays deployed. Its width is 8 feet (2.43 meters) x 8 feet (2.43 meters). Its height is 10.33 feet (3.15 meters). It's powered by two solar panels that generate between 1,226 watts and 3,000 watts. It has five instruments to explore asteroid Bennu and also has a robot arm to touch the asteroid long enough to collect a sample. Hide Caption 10 of 13 Photos: OSIRIS-REx will take a sample of asteroid Bennu and return it to Earth OSIRIS-REx will briefly touch asteroid Bennu to take a sample of the space rock. It will use its 11-foot ( (3.35 meters) robot arm, called the Touch-and-Go Sample Arm Mechanism, or TAGSAM. Above, a worker at Lockheed Martin tests the arm. Hide Caption 11 of 13 Photos: OSIRIS-REx will take a sample of asteroid Bennu and return it to Earth NASA's OSIRIS-REx spacecraft is rotated on a spin table during testing on May 24 at Kennedy Space Center. Hide Caption 12 of 13 Photos: OSIRIS-REx will take a sample of asteroid Bennu and return it to Earth These radar images of asteroid Bennu were obtained by NASA's Deep Space Network antenna in Goldstone, California, on September 23, 1999. Hide Caption 13 of 13

It won't be the last we see of this spacecraft. It will be back in 2023 -- and it will come bearing gifts. NASA launched OSIRIS-REx from Cape Canaveral, Florida, in September 2016 to chase down Bennu, a dark asteroid that could one day threaten Earth.

The probe is scheduled to arrive at Bennu in August 2018 and will survey the asteroid for several months. Then, in July 2020, it will use its robot arm to blast the asteroid with nitrogen, causing it to kick up rocks and dust. It will try to snag a sample of the dust to bring back to Earth in 2023.

It's not too late to wave

If you missed the flyby, don't worry, we should get some pictures soon.

NASA encouraged amateur astronomers with specialized gear to photograph OSIRIS-REx as it passed by and to share their photos with the space agency.

"The opportunity to capture images of the OSIRIS-REx spacecraft as it approaches Earth provides a unique challenge for observers to hone their skills during this historic flyby," Lauretta said.

And it's not too late to wave goodbye to OSIRIS-REx. The mission team is asking the public to celebrate the Earth gravity assist by joining in the "Wave to OSIRIS-REx" social media campaign.

No matter where you are on Earth, take a selfie (or a group photo) waving to OSIRIS-REx. Share your photos at hashtag #HelloOSIRISREx.

On Tuesday, the OSIRIS-REx team will let us know how everything worked out with the flyby. They'll discuss the results and release images taken by the spacecraft's cameras.