A gay Taiwanese man in his 40s who lived with his partner in Japan for 25 years, partly illegally after overstaying his visa, has had his deportation order revoked and a special residency status granted by the Justice Ministry, his lawyers said Friday.

"It's the first time special permission to stay in the country has been given to a foreign gay partner of a Japanese citizen," said one of the lawyers, although the ministry denied its decision was based on the man's sexual orientation.

(The Taiwanese man granted special permission to remain in Japan (foreground) and his partner (background) at a press conference in Tokyo on March 22, 2019.)

"We didn't put special weight that he had a relationship with a Japanese male. We went through our usual determination process, looking holistically at their situation, including residency and their actual lives," an immigration bureau official from the ministry said.

The Taiwanese man said at a press conference he is "grateful for the (ministry's) generous discretion," while his teary-eyed Japanese partner said he will "look forward to starting now."

According to the Taiwanese man's defense team, he came to Japan on a one-year student visa in September 1992 to enroll in a Japanese language school and re-entered the country on a three-month visa in October 1993 to prepare for a language proficiency test. He started a relationship the next month with his Japanese partner, now in his 50s.

In June 2016, his illegal residency was discovered and deportation was ordered. The man filed a petition with the Tokyo District Court the following year to revoke the deportation.

With his new residency status, which took effect March 15, the man has now withdrawn his petition.

The Justice Ministry's decision came almost a month after 13 same-sex couples sued the government for not recognizing marriage equality, arguing it is unconstitutional and discriminatory.

Non-recognition means that couples involving foreign partners cannot gain residency similar to straight couples. Same-sex couples have said it causes them stress as they worry about possible deportation for the foreign partner if a visa cannot be obtained.

The concern is well-known to a German-Japanese couple who have been together since 2011 and who are one of the 13 plaintiffs against the government. To live with her Japanese partner, Kristina Baumann, 32, has had to continuously enroll in schools to obtain student visas at a cost of several hundred thousand to a million yen ($9,000) a year.

Her partner Ai Nakajima, a 40-year-old office worker from Yokohama, called the ministry's decision a "historical first step."

However, she cautioned that "future decisions on similar cases will differ by couple" and that the decision does not indicate government recognition of marriage equality.

"We'd like marriage equality itself to be recognized," she emphasized.

Gon Matsunaka, representative of an NGO supporting LGBT causes called Good Aging Yells, says that although he does not know how the ministry came to its decision, he believes it wanted to protect gay rights.

"This could have a positive impact on the court cases," he said.

He also said that the ministry's decision could encourage LGBT people who felt society does not change despite raising their voice.