Alan and Alex Stokes, popular YouTube pranksters, have been charged with false imprisonment and swatting after police responded to what they thought was a bank robbery.

In October 2019, the 23-year-old twins allegedly dressed in all black and carried duffel bags as they feigned having just robbed a bank while being filmed, according to the Orange County, Calif., District Attorney's Office.

YOUTUBE STAR JAKE PAUL'S CALIFORNIA HOME RAIDED BY FBI IN CONNECTION WITH ONGOING FEDERAL INVESTIGATION

The two are accused of ordering an Uber to drive them away, but the driver refused. A witness believed the social media personalities had actually robbed the bank and were attempting to carjack the Uber.

When the police arrived, they ordered the driver out of the car at gunpoint before they determined he was not involved and released him.

The brothers received a warning before being let go.

According to the release, however, the two performed a similar prank just hours later on the University of California, Irvine, campus, again prompting a call to the police.

CALIFORNIA GOVERNOR SLAMS YOUTUBE STAR FOR THROWING WEEKEND PARTY: REPORT

"These were not pranks," DA Todd Spitzer said. "These are crimes that could have resulted in someone getting seriously injured or even killed. Law enforcement officers are sworn to protect the public and when someone calls 911 to report an active bank robbery they are going to respond to protect lives."

Alex Stokes (left) and Alan Stokes have been charged with false imprisonment and swatting. (Getty Images)

He continued: "Instead, what they found was some kind of twisted attempt to gain more popularity on the internet by unnecessarily putting members of the public and police officers in danger."

Both Alan and Alex have been charged with one felony count of false imprisonment effected by violence, menace, fraud, or deceit and one misdemeanor count of falsely reporting an emergency.

CLICK HERE TO GET THE FOX NEWS APP

The brothers both face a maximum sentence of four years in prison should they be convicted on all counts.

The "Stokes Twins" YouTube account has 4.81 million subscribers.