He was appointed as Deputy prosecutor of Tehran in 1985 and moved to the capital. After three years and in early 1988, he was placed in the attention of Ruhollah Khomeini and received special provisions (independent from judiciary) from him to address legal issues in some provinces like Lorestan, Semnan and Kermanshah.