An Iranian man who had been living in Japan illegally and was engaged in activities opposing the government in Tehran was granted refugee status Tuesday by the Tokyo District Court.

The ruling nullified decisions made in 2002 by the justice minister to reject the man's request for asylum and by immigration authorities to deport him. The man, 38, is a member of Iran's communist party.

"The man has been actively participating in activities against the Iranian government in Japan and there is a danger of persecution if he returns to his country," said presiding Judge Toshihiko Tsuruoka. "Decisions such as not recognizing the man as a refugee are illegal."

The courts rarely recognize claims for refugee status based on applicants' activities in Japan, according to the man's supporters.

The Justice Ministry's Immigration Bureau said it will decide whether to appeal "after thoroughly examining the content of the ruling."

The man applied for refugee status in May 2001, but his request was rejected when the justice minister decided to deport him because an application for refugee status should be filed within 60 days of entry.