A large asteroid is set to pass Earth on Halloween, surprising astronomers who only discovered it two weeks ago. The asteroid, which measures up to 2,000ft in diameter, will flyby Earth at a distance of around 310,000 miles, or 1.3 lunar distances – the largest object to come so close to our planet in recent years.

Despite its size, the asteroid – called 2015 TB145 – was found just three weeks before its closest approach by astronomers using the Pan-STARRS I telescope in Hawaii. Nasa said it is the biggest asteroid to come this close to Earth until 2027.

More about Halloween 2015 Pet costume ideas at New York\'s Tompkins Square Dog Parade

The asteroid is on an extremely eccentric and a high inclination orbit," the space agency said in a statement, possibly explaining why it avoided detection until two weeks ago. "This is the closest approach by a known object this large until 1999 AN10 approaches within one lunar distance in August 2027. The last approach closer than this by an object with H < 20 was by 2004 XP14 in July 2006 at 1.1 lunar distances."

Nasa said preliminary estimations suggest the asteroid is between 689 and 2,133ft in diameter and is travelling at around 126,000km/h. It should be visible with a telescope and will pass the constellation of Orion on 30 and 31 October. Nasa said it hopes to obtain high resolution images of the asteroid as it passes.

The asteroid's flyby comes as prominent scientists call for more research into asteroid-tracking technology to protect the planet from unknown space rocks. It is currently estimated we have detected around 1% of asteroids bigger than 40m that could pose a risk to Earth.

Asteroid Day, launched earlier this year, outlined the goal of rapidly increasing asteroid detection over the next 10 years. Organisers said they want to find 100,000 asteroids every year – at present we have found around 10,000 in total.

Announcing the event last year, Queen guitarist and astrophysicist Brian May said: "The more we learn about asteroid impacts, the clearer it becomes that the human race has been living on borrowed time. We are currently aware of less than 1% of objects comparable to the one that impacted Tunguska, and nobody knows when the next big one will hit. It takes just one."

The discovery of 2015 TB145 also follows the announcement that Nasa had terminated its partnership with the B612 Foundation, an privately funded organisation hoping to launch the asteroid-hunting Sentinel satellite.

Nasa spokesman Dave Steitz told Space Policy Online: "Due to limited resources, Nasa can no longer afford to reserve funds [for the project]. Nasa believes it is in the best interest of both parties to terminate this agreement but remains open to future opportunities to collaborate with the B612 Foundation."