A Pakistani man who has received notice of deportation after living in Japan for more than 30 years has filed a lawsuit with the Tokyo District Court, seeking special permission to remain in the country with his ailing wife.

Mohamad Sadaq, 55, said he fled to Japan in 1988 because he feared persecution after taking part in an anti-government demonstration in Pakistan as a member of an opposition party when he was a student.

He was arrested in Japan in 2007 on suspicion of overstaying his visa and detained at an immigration facility as he was preparing to marry his wife, a Chinese national with permanent residence status.

Sadaq was freed in 2009 on provisional release after the marriage but was detained again for about a month in 2010.

He received the notice last month stating that he will be deported by the end of August but says he needs to stay in the country to support his wife, who underwent surgery for breast cancer in 2014.

"Considering the family's situation, he should not be deported," his lawyer, Shoichi Ibuski, said Monday.

The Immigration Services Agency said only that it will "respond appropriately."

Immigration authorities usually take foreign nationals into custody prior to deportation, but detention can be suspended in exceptional cases.