The surprise dismissal and arrest of dozens of ministers, royals, officials and senior military officers by Saudi Crown Prince and Defense Minister Mohammed bin Salman (MBS) is unprecedented in the secretive, 85-year-old kingdom. Picture: Pavel Golovkin/AP

Dubai - Senior Saudi Prince Miteb bin Abdullah, a former National Guard head once seen as a contender to the throne, has been freed after more than three weeks in detention, according to Twitter messages by royal family members on Tuesday.

Miteb was among dozens of royal family members, ministers and current and former senior officials who were rounded up in a graft inquiry at least partly aimed at strengthening the power of Crown Prince Mohammed bin Salman.

It was not immediately possible to confirm the reports of his release and Saudi officials had no immediate comment.

"Almighty, thanks be to you ..." wrote Abeer bint Khaled bin Abdullah, a royal family member, in a posting on her Twitter account. Posting an apparent file photo of Prince Miteb, she added: "May God give you long life, long life full of health, and keep you for us."

Writing on his Twitter account, Moaid Mahjoob, who identifies himself as director of external relations for Princess Jawahar Al-Saud, another Saudi royal family member, said Prince Miteb "had been released and that he was at his home in Riyadh".

Another royal family member, Princess Nouf bint Abdullah bin Mohammed bin Saud, also posted a similar message on Twitter, writing over a photo of Prince Miteb: "May you be safe for us, Abu Abdullah."

The posting of a photo and thanksgiving to God indicates the author of the Tweet believes Miteb has been freed.

It was not immediately clear how his release had come about but sources familiar with the matter have said that Saudi authorities were striking agreements with some of those in detention asking them to hand over assets and cash in return for their freedom.

In an interview with the New York Times published last week, Prince Mohammed bin Salman was quoted as saying that the vast majority of about 200 businessmen and officials implicated in crackdown are agreeing to settlements under which they hand over assets to the government.

As the Sandhurst-trained preferred son of the late King Abdullah, Miteb was once thought to be a leading contender for the throne.

Before he was sacked by a royal decree on Nov. 4, he headed the Saudi National Guard, an elite internal security force originally based on traditional tribal units that was run by his father for five decades.

He was also the last remaining member of Abdullah's Shammar branch of the family to retain a key position at the top of the Saudi power structure, after brothers Mishaal and Turki were relieved of their posts as governors in 2015.