Yemen's prime minister says Shiite rebels who overran the capital, Sanaa, and placed him, the president and the entire government under house arrest, have released him from the forced detention.

Khaled Bahah resigned while he was being held by the rebels known as Houthis.

Bahah on Monday in a posting on his Facebook page described his release as a goodwill gesture meant to "push the political process in a positive direction."

Bahah says he is now leaving Sanaa to visit his family elsewhere. It was not immediately clear exactly when he was released.

In January, the Houthis placed President Abed Rabbo Mansour Hadi and the entire government, including Bahah, under house arrest in Sanaa, which they overran last September.

Hadi eventually escaped to the southern port city of Aden.