China attempted to launch a top-secret military satellite into orbit on Thursday.

However, videos and pictures posted to Chinese social media show the Long March 4C rocket launch failing in mid-flight.

Chinese state media later confirmed the loss of the space mission, apparently because of a problem with the rocket's third and uppermost stage.

The rocket failure marks the nation's second of 2019. The first was by a Chinese startup called OneSpace.

Visit Business Insider's homepage for more stories.

China attempted to launch a top-secret military payload into space early Thursday morning, but the attempt ended in a rain of wreckage.

The loss of the Long March 4C rocket and its satellite marks the nation's second launch failure of 2019. The first was a commercial launch in March by the Chinese aerospace startup OneSpace.

China put out notifications of airspace closures and other safety measures ahead of the launch, but — as is common — it did not formally announce the mission.

The rocket lifted off of its launch pad at Taiyuan Satellite Launch Center in northern Shanxi province around 6:49 a.m. local time (6:49 p.m. EDT on Wednesday). But within a couple of minutes, videos and photos posted to Chinese social-media sites showed the rocket taking a hard and unexpected turn in the sky.

A video posted to Chinese social media appears to show the loss of a top-secret military satellite aboard a Long March 4C rocket on May 23, 2019. Weibo; Business Insider Zigzag clouds of smoke then appeared in the sky, and one video posted to Weibo — a zoomed-in version of which is reproduced below — shows a tiny white dot rapidly falling back to Earth.

"Thanks to footage and images posted on Chinese social media & reposted elsewhere, it was possible to track this event and put the pieces together," Andrew Jones, a contributor to SpaceNews, tweeted on Thursday.

Xinhua confirmed the failure about 15 hours after the launch attempt. In a post on its website, the Chinese state news agency said the launcher's first and second rocket stages performed well, but a problem occurred with the third stage — the uppermost part that finishes pushing a payload into orbit.

Xinhua also said the rocket's wreckage was observed falling back to Earth.

Unverified photos posted on Twitter earlier on Thursday appear to show pieces of spacecraft, including frayed chunks of carbon-fiber composites and metallic panels, that the social-media posts said landed in remote towns and villages shortly after the failure.

China's Long March 4C rockets have successfully flown Chinese satellites, probes, and other unmanned payloads into space about two dozen times.

The launcher's last and only other known failure was in August 2016, though Chinese officials waited weeks to confirm that mission's loss, according to Spaceflight Now.

Thursday's launch was designed to drop off a Yaogan-33 in orbit. Yaogan spacecraft are often described by Chinese state news agencies as land- and agriculture-surveying satellites, but Western nations beg to differ.

"Outside analysts understand the satellites to be optical and synthetic aperture radar satellites for military reconnaissance purposes," Jones reported for SpaceNews.

Alex Ma contributed to this post.