A California music producer who has been stuck in British Columbia for two months fears he may soon be deported to his birth country of Spain, despite not having lived there in more than 40 years.

Juan Martinez – best known for his work with esteemed Los Angeles hip-hop group the Pharcyde, under the stage name J-Sw!ft – has been in the province since mid-January, when he performed a reunion show with the Pharcyde in Vancouver. When he tried returning home on Jan. 15, U.S. customs officials turned him away.

Mr. Martinez's legal standing in the United States is complicated. The 43-year-old was born in Spain but moved to California at age 2, becoming a permanent resident. He says he didn't realize until his mid-30s that he did not hold U.S. citizenship.

Story continues below advertisement

That decade, Mr. Martinez struggled with homelessness and substance abuse – issues, he said, that were compounded by family health issues and the dissolution of his marriage. He was arrested several times for drug possession, though those arrests never precluded him from international travel.

His situation now centres largely on a 2012 arrest for drug possession that triggered deportation proceedings. Mr. Martinez filed an appeal and departed for a nine-country European tour with the Pharcyde, which concluded without issue.

After a one-off show in Vancouver in January, Mr. Martinez says a U.S. customs official at Vancouver International Airport refused him re-entry, saying that the terms of his appeal had required that he remain in the United States. He spent four days in jail.

"They claimed that by travelling out of the country, I had abandoned my appeal," Mr. Martinez said. "But that's not true. I had travelled to nine countries in Europe on appeal."

A couple of more attempts to re-enter the United States were unsuccessful as well.

Robert Pauw, a Seattle-based lawyer who represents Mr. Martinez and specializes in immigration law, said a U.S. permanent resident is entitled to travel while an appeal is pending.

"We find that there is quite a bit of legal misinformation that happens at the border," he said in a phone interview Thursday. "It's obvious that the border officers who made that decision made a legally incorrect decision."

Story continues below advertisement

Story continues below advertisement

Mr. Pauw said he will be filing a complaint in Seattle on behalf of Mr. Martinez, asking the court to overturn the decision by U.S. Customs and Border Protection. On March 26, Mr. Martinez is scheduled to appear before the Immigration and Refugee Board of Canada in Vancouver for an admissibility hearing, at which time he could learn whether he will be deported to Spain.

"This is a person who came to the U.S. when he was two years old," Mr. Pauw said. "He is one of our people, even if technically or legally he doesn't qualify as a citizen. For all reasonable intents and purposes, he is a person in our community. He's married to a U.S. citizen, he has U.S. citizen children he's trying to take care of. I think this is a reflection of the really horrendous way that the U.S. immigration system works."

Since January, Mr. Martinez has been staying with friends in the suburb of Coquitlam. Twice a week, he must check in with Canada Border Services Agency officials in Vancouver. He says calls home to L.A., where his wife and four children live, are "overwhelming."

"I miss them so much, and I have to be positive for them," he said. "My daughter's like, 'Are you ever coming home?' I'm like, 'Yeah, baby. You just have to pray. It's going to take some time, but I am coming home.'"

On Sunday, friends and supporters will throw a benefit at the Alexander in Gastown to help cover Mr. Martinez's legal costs and living expenses. Fatlip of the Pharcyde is slated to attend, as are local acts including Chin Injeti, the Rascalz and Kyprios.

"We had to do something for him," said Marlon J. English, one of the organizers of the benefit. "We can't have him sleeping on a couch here, especially when he's got kids in L.A. That's insane to me."