Can I sell stock on expiration day to satisfy margin requirement for physical settlement

Hello,

I sold a put option that will most likely get assigned at expiration tomorrow. The cost of the physical settlement will be 5 lakhs.

Can I sell shares worth 5 lakhs just prior to market close on expiration day in order to satisfy the margin requirement of this physical settlement?

Thanks!

Yes, you can use the proceeds received from selling shares.

Thank you!