CNN  — 

Kyle Rittenhouse, the teen accused in the fatal shooting of two people in August during protests in Kenosha, Wisconsin, was released from custody after posting $2 million in bail, according to the county’s sheriff’s department.

Rittenhouse was released Friday afternoon after the $2 million was posted through his attorney, Kenosha County Sheriff’s Department spokesman Sgt. David Wright told CNN.

CNN has reached out to attorneys for Rittenhouse for comment.

Attorney Lin Wood said in a tweet on Friday that Mike Lindell, CEO of My Pillow, Inc., and actor Ricky Schroder helped raise the “required $2M cash bail” for Rittenhouse.

“God bless ALL who donated to help #FightBack raise required $2M cash bail. Special thanks to Actor Ricky Schroder @rickyshroder1 & Mike Lindell @realMikeLindell for putting us over the top. Kyle is SAFE. Thanks to ALL who helped this boy,” read the tweet.

Rittenhouse faces charges that he allegedly killed Anthony M. Huber and Joseph Rosenbaum and wounded Gaige Grosskreutz during protests that followed the police shooting of Jacob Blake in Kenosha in August.

Kenosha County Commissioner Loren Keating said in setting the bond earlier this month that the court considered Rittenhouse a “flight risk,” because he could face a “mandatory life sentence or at least significant amounts of time, likely decades of time period of incarceration” if convicted.

Rittenhouse was afraid he would spend the rest of his life in prison after turning himself in to authorities, a friend of the teenager told police in a recorded interview that CNN obtained through the Freedom of Information Act.

“The dude’s sweating like a pig. He’s just freaking out. His face is white. He’s like, ‘I’m going to jail for the rest of my life. I’m done.’ He’s just scared,” the friend, Dominick Black, is seen explaining to a detective in the video recorded on August 26 in Antioch, Illinois, where Rittenhouse was arrested.

Black said he tried to calm both himself and Rittenhouse, telling Rittenhouse, “from what you’re telling me, you were defending yourself, as far as I believe. Just calm down, we’re going to go home, you’re going to go turn yourself in, it will all be fine,” he said.

After hearing gunshots about two or three blocks away, Black said he got a call from Rittenhouse.

“He’s like, ‘I just shot somebody! I just shot somebody!’ And I tried to ask him why, what happened, where are you, and he hung up the call,” Black said.

Black told Antioch Police detectives that Rittenhouse told him what happened when he was confronted by police in Kenosha. “He said he walked up to her and was like ‘I just shot somebody’ and the lady, she told him, ‘no, go’ and then she threatened to pepper spray him,” Black said.

Rittenhouse faces two felony charges of homicide in the death of Rosenbaum and Huber, and a felony attempted homicide charge in the case of Grosskreutz.

He is also charged with possession of a dangerous weapon while under the age of 18, a misdemeanor, according to court records.

An attorney for Rittenhouse has claimed that there is evidence that the teen acted in self-defense.

Black, who is charged with two counts of intentionally giving a weapon to a person under the age of 18 causing death, allegedly bought and stored the alleged murder weapon for Rittenhouse.

Black’s attorney claims there is no evidence he gave a firearm to Rittenhouse, according to a hearing Thursday where the attorney’s motion to drop charges against Black was denied. Black is due back in court on January 13, according to court records.

The Chicago Tribune first reported on the police interview recording.

Rittenhouse is due back in court for a preliminary hearing on December 3.

CNN’s Christina Maxouris and Theresa Waldrop contributed to this report.