Earlier this week, a video that claimed to thwart thieves who took packages from doorsteps with a glitter bomb went viral. Now, the former NASA engineer and YouTube star who made the video has confirmed that some of the thieves' reactions were faked.

Following initial hype, some internet denziens pointed out discrepancies in the video on the photo service Imgur. On Wednesday, the video's creator, Mark Rober, confirmed that some of the reactions had been faked, although he had not known that was the case at the time he posted the video, according to a statement he posted Wednesday on Twitter.

Tweet

Rober said he removed a minute and a half of the footage from the original video after learning that some of the "thieves" were actually acquaintances of the person he asked to help plant the packages on doorsteps. Rober said he agreed to compensate the person, who was a friend of a friend, based on the number of packages that were successfully recovered. The YouTuber later learned his helper recruited two people to collect the packages on tape. Three apparently real reactions remain in the video, Rober said.

"I am really sorry about this. Ultimately, I am responsible for the content that goes on my channel and I should have done more here," Rober said in the statement, adding that this was his first prank video. "I can vouch that the reactions were genuine when the package was taken from my house. Having said that, I know my credibility is sort of shot, but I encourage you to look at the types of videos I've been making for the past 7 years."

People on Twitter praised the apology, including the investor Chris Sacca.

Tweet

"It was and remains the video of the year," Sacca wrote in response to the statement. "The beauty is the obsessive engineering that led to a gorgeous and elegant solution. I can't wait to see your future videos all while my kids and I catch up on your past work."

Subscribe to CNBC on YouTube.

WATCH: YouTube's top earners made $180.5 million in 2018