Halloween asteroid to pass Earth by 310,000 miles (representational image)Nasa, ESA, M.A. Garlick, University of Warwick, and University of Cambridge

A massive "spooky" asteroid is set to flyby Earth on Halloween, coming about 310,000 miles, or 1.3 lunar distances, from the planet on 31 October. The asteroid, 2015 TB145, was discovered just three weeks before its closest approach and has been dubbed the Giant Pumpkin because of the coinciding celebration.

The asteroid measures between 689 and 2,133ft in diameter and is travelling at about 126,000km/h. It was detected by astronomers using the Pan-Starrs I telescope in Hawaii, and Nasa said it is the biggest asteroid to come so close to Earth until 2027.

"The asteroid is on an extremely eccentric and a high inclination orbit," the space agency said in a statement. "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."

Weather permitting 2015 TB145 will be visible with a telescope when it passes the constellation of Orion on 30 and 31 October. A live stream of the flyby will also be broadcast online, with experts at the Slooh observatory conducting a special show about the asteroid on 28 October, with another stream scheduled for the 31 October.

Experts at Slooh note the asteroid is about twice the size of Trump World Tower in New York and is travelling around 29 times as fast as a high velocity rifle bullet. It is around 32 times the size of the Chelyabinsk meteor that hit Russia in 2015: "If it [2015 TB145] were to impact us, the energy released would be measured not in kilotons like the atomic bombs that ended World War Two, but in H-Bomb type megatons. It will be interesting indeed to watch Slooh track and image this substantial intruder as it passes just 300,000 miles from us."

During the broadcast, astronomer Bob Berman and guests will discuss the potential dangers posed by Near Earth Asteroids as they watch the "worrisome rock" pass our planet, while trying to work out why we only discovered it three weeks before its close encounter with Earth.