Senior Saudi Arabian Prince Miteb bin Abdullah was released from custody Tuesday after being in detention for more than three weeks, a family member wrote on social media.

Abeer bint Khaled bin Abdullah, a royal family member, tweeted: “Almighty, thanks be to you… May God give you long life, long life full of health, and keep you for us.” The tweet contained a photo of Prince Miteb, Reuters reported.

Saudi officials did not immediately comment on Prince Miteb’s reported release.

SAUDI PRINCES, OTHERS ARRESTED IN SWEEP VIEWED AS SHOW OF FORCE BY CROWN PRINCE

Prince Miteb, who up until his detainment on Nov. 9 headed the country’s powerful National Guard, was taken into custody in an anti-corruption investigation.

Saudi Crown Prince Mohammed bin Salman ordered dozens of top princes and businessmen to be detained after investigators said they uncovered at least $100 billion in corruption. Officials believed the crown prince ordered the detentions in order to bolster his power, The New York Times reported.

SAUDI CROWN PRINCE OPENS ISLAMIC MILITARY ALLIANCE MEETING

Prince Miteb was considered a contender for the throne a few years ago and was believed to have opposed Prince Salman from becoming a crown prince.

Prince Miteb's detention stands out because he was the last remaining prince of his generation in a position of real power, which made him a potential obstacle to the throne for the crown prince.

The Associated Press contributed to this report.