The science spacecraft launched from Virginia’s coast last year has been orbiting the moon for months and is about to conclude its mission with a crash into the lunar surface, authorities said.

The unmanned spacecraft was the first to be sent from Virginia to the moon, NASA said.

With its primary scientific mission completed and its fuel almost exhausted, the intricate package of instruments is being lowered gradually into an orbit as little as a mile or two above the pocked and cratered surface of the moon, NASA said last week.

The orbit is designed to let the craft continue gathering data as close as possible to the surface, as a kind of scientific bonus.

It is also a prelude to the planned crash of the spacecraft — described as about the size of a vending machine or small car — into the far side of the moon.

NASA said it expects the craft to crash, crumple and break apart “on or before” April 21.

It was launched Sept. 6 from the Wallops Flight Facility on Wallops Island on Virginia’s Atlantic shore. The facility is operated by NASA’s Goddard Space Flight Center, headquartered in Greenbelt, Md.

It’s estimated that millions of people for miles around saw a fiery streak in the night sky as the spacecraft was propelled aloft by a rocket built and operated for the Air Force by Orbital Sciences, a company based in Northern Virginia.

A principal aim was to study lunar dust and the makeup of the highly rarefied lunar atmosphere. Such information could answer questions about other bodies in the solar system, NASA said.

NASA said a variety of factors could cause the craft’s impact to come before April 21.

The space agency is inviting the public to guess when it will occur, at socialforms.nasa.gov/ladee . (Ladee stands for lunar atmosphere and dust environment explorer.)

Winners will get a personalized commemorative certificate, NASA said.