The US space agency called the globular cluster, located 30,000 light-years away from Earth, a "celestial festival of lights".
A globular cluster is a stable, tightly bound cluster of tens of thousands to millions of stars, and are associated with all types of galaxies.
"Happy #Diwali to all those who celebrate," NASA wrote in a post on X (formerly Twitter).
"NASAHubble captured a celestial festival of lights -- a globular cluster -- 30,000 light-years away from Earth, near the dense and dusty center of our own Milky Way galaxy," it added.
NASA stated that the cluster contains stars ranging from 12 billion years old to about 2 billion years old.
"This globular cluster is unlike others, containing both old and young stars," the agency posted on Instagram.
"Some of the older stars are almost as old as the universe itself, around 12 billion years old, while the younger stars are around 1-2 billion years old," it added.
Hubble is managed by both NASA and (European Space Agency).