NEW YORK — A small object that zipped by Earth in May is most likely a wayward piece of space junk left over from an interplanetary mission, NASA officials said.

The unidentified object, known only as 2010 KQ, flew past Earth May 21 at a distance just beyond the orbit of the Moon, which is about 384,402 kilometers away. The object is now slowly moving away from Earth.

After a careful analysis of 2010 KQ’s trajectory through space, NASA scientists concluded that it likely is the spent upper stage of a rocket that launched a spacecraft to another destination in the solar system. It is likely just a few meters in size, they found.

Like Earth, the object orbits the sun, scientists were able to calculate.

“The orbit of this object is very similar to that of the Earth, and one would not expect an object to remain in this type of orbit for very long,” Paul Chodas, a scientist at NASA’s Near-Earth Object Program Office at the Jet Propulsion Laboratory in Pasadena, Calif., said in a statement.

Chodas did not speculate on what mission the rocket remnant may be left over from.

The object was discovered May 16 by astronomer Richard Kowalski from an observatory in the mountains north of Tucson, Ariz., as he participated in the Catalina Sky Survey, a NASA-sponsored effort to monitor the cosmos. NASA tracked the object for five days until it made its closest approach.

Follow-up observations by astronomer S. J. Bus at the Infrared Telescope Facility atop Mauna Kea in Hawaii examined the object’s spectral characteristics, which did not match any known asteroid categories — hinting that it is of human manufacture.

The small size estimate for 2010 KQ is based on its relative dimness in observations.

This is not the last Earth will see of 2010 KQ. The rocket remnant will return in 2036, but poses little risk of hitting the Earth and no chance of surviving atmospheric re-entry, Chodas said.

“At present, there is a 6 percent probability that 2010 KQ will enter our atmosphere over a 30-year period starting in 2036,” Chodas said. “More than likely, additional observations of the object will refine its orbit and impact possibilities. Even in the unlikely event that this object is headed for impact with Earth, whether it is an asteroid or rocket body, it is so small that it would disintegrate in the atmosphere and not cause harm on the ground.”

The year 2036 has special resonance among space-rock watchers. That is the year that another object, the huge asteroid Apophis, is also expected to fly relatively close by Earth.

Apophis gained fame as a potentially dangerous asteroid because of early predictions that gave it a slight chance of hitting Earth. In reality, on its closest approach, expected April 13, 2036, it will miss Earth by about 29,450 kilometers.

There is only a 1-in-250,000 chance of Apophis striking the Earth, odds that NASA considers to be low.

Like 2010 KQ, Apophis will also be back. It will make another pass by Earth in 2068, with the chances of a dangerous impact estimated at 1 in 333,000.

Chodas and other scientists with NASA’s Near-Earth Object Program regularly keep tabs on asteroids and space debris to determine the risk to the planet, as well as to spacecraft in orbit today. They use a network of telescopes on the ground and in space to perform the survey.

NASA also works with the U.S. military’s Space Surveillance Network to track potentially dangerous space debris flying in low Earth orbit.