Akhilesh Yadav and his wife Dimple Yadav had gone to the state assembly building to participate in an event when the incident occurred. (File photo)

Uttar Pradesh Chief Minister Akhilesh Yadav and his wife Dimple were stuck in an elevator at the state assembly for nearly half an hour today - throwing security personnel into a tizzy.The incident sparked panic in the building as both the Chief Minister and his wife, a lawmaker, failed to come out of the lift despite efforts by the Chief Minister's security staff.Officials in the assembly complex said the incident took place because of a technical snag and added that facts would come out only after a thorough investigation.As the couple could not come out even after 20-25 minutes of struggle, gas masks were called for and an ambulance was kept ready as a crowd of Vidhan Bhawan employees and officials gathered outside the elevatorHowever, after nearly half an hour of being locked in, they managed to come out of the elevator, usually reserved for the Chief Minister or the Speaker.Mr Yadav and his wife had gone to the state assembly building to participate in an event when the incident occurred.He later tweeted, "Got stuck in lift in Vidhan Sabha for a while. Safe and sound now by God's grace and good wishes of well-wishers.""Action will be taken against those in charge of maintenance of the lift," said another tweet from the Chief Minister's Office.