Just months before Saudi Arabia's ban lift on women driving is set to take effect in June, a female doctor was arrested by the kingdom's authorities for driving in Al Baha.

The arrest took place on Tuesday and came after a video capturing the woman behind the wheel went viral on social media.

Taken by a man who spotted her car on the highway, the footage sparked controversy on Saudi Twitter, leading authorities to take action. 

According to Okaz newspaper, Al Baha's traffic authority officials interrogated the woman after her detention.

She explained that she had to drive to the hospital where she works given that her husband is ill and she found no other male driver who could give her a lift.

The woman's husband signed a paper banning her from driving "illegally"

The woman was eventually released from detention but not before her husband signed a document stating she will not drive again until the ban lift on women driving takes effect in June.

News of the incident is still circulating online with hundreds of tweeps debating the matter.

While some thought the woman had no right to drive...

"Is there nothing called a taxi or Uber?"

Others couldn't disagree more

"Where's the problem? Why was she arrested?! She's eventually going to drive, if not today then tomorrow. As long as she can drive and isn't risking anyone's life on the road, she should be free to. They should have just given her a fine for not holding a driver's license."

Some were left angered by the arrest

"A doctor arrested! I thought she was a terrorist or drug dealer. We're still moving backward, our ambitions are so far away from our sad reality."

"This is just because she's a woman, but when underage teens drive, it's fine"

"Welcome to the world of regression."

A few are calling on the man who filmed the woman to be held accountable

"The person who filmed this while driving and passed a yellow road line should be held accountable. He should also be punished for invading this woman's privacy. These people must be stopped or they're going to harass female drivers come June."

"Not much is left, two months and the ban lift takes effect"

Saudi women to legally hit the road in June

Saudi's King Salman issued a royal decree granting women the right to drive in September last year. It is set to take effect in June 2018. 

The order ended a long-standing policy that banned women from driving in the country. The ban had been criticized by international campaigners and women’s groups.

Signed by the monarch, the order said the traffic laws would be amended in order to allow the government to issue driver’s licenses for men and women.

In recent months, Saudi women have been getting ready to get behind the wheel, attending driving lessons and prepping up to officially own the kingdom's roads.