Before entering politics, he was a member of the public service nearly 20 years, and served various positions in the Selangor state government and Prime Minister's Department.
[1] Hasan joined the Pan-Malaysian Islamic Party (PAS) after leaving public service and subsequently became a vice-president in 2001.
PAS went on to form a coalition government with Parti Keadilan Rakyat and the Democratic Action Party, and Hasan was appointed as a state executive councillor (EXCO), holding the Islamic Affairs, Malay Customs, Infrastructure and Public Amenities portfolio.
[5] During his tenure, Hasan has openly criticised the state government on a few occasions, and has been accused of harbouring ambitions of becoming Menteri Besar of Selangor himself.
[6][7] In 2011, he broke ranks with the Pakatan Rakyat state government again after speaking out in support of a raid on a church event.