Futures in the derivatives sector will always have a higher margin than a hedge position of a Buy Option. Therefore, it is necessary to square off the futures part of the hedged position first.
Additionally, Sell Options will always have a higher margin than a Buy Options hedge position. Hence, it is necessary to offload Sell Options first to prevent any margin shortfall.