( CNN ) -- Onyango Okech Obama -- an uncle of President Barack Obama who has been in the United States illegally for decades -- has gotten a federal court 's OK to stay in his adopted country , according to an attorney representing the uncle . Federal immigration Judge Leonard I. Shapiro in Massachusetts agreed without argument Tuesday to allow the uncle , who has been living and working in U.S. for 50 years , to stay and obtain a green card , said attorney Margaret Wong . At the hearing , Wong said , the judge looked at Onyango Okech Obama 's character , reviewing his long-term employment with a grocery store in Framingham , Massachusetts , his tax records and his rent payments , and noting that he is not on any government assistance programs . Shapiro also took into account federal immigration law that allows people who came to United States before January 1972 to apply for residency , Wong said , adding that her client has been living in U.S. since October 1963 . `` I 'm relieved , I represented the family for some time and it 's really a relief , '' said Wong . In his testimony before the judge , according to Wong , Onyango Okech Obama mentioned that Barack Obama stayed with him for three weeks during the future president 's student days , after he was accepted into law school . Wong called her client a proud , honorable gentleman who is quiet and very nice . In 2011 , Onyango Okech Obama was arrested on drunk driving charges , and ordered to regularly check in with immigration , according to Brian P. Hale , then director of public affairs for U.S. Immigration and Customs Enforcement . At the time of that arrest a federal law enforcement source who spoke on the condition of anonymity said the defendant was not legally in the United States and had been previously ordered removed from the country . `` I 'm so thankful that everything is finished , '' said Wong . However , federal immigration authorities have 30 days to appeal Shapiro 's ruling .
Onyango Okech Obama is an uncle of President Barack Obama . Hide Caption 8 of 10 Photos:Photos: A federal immigration judge notes his character , record of working and paying taxes . The judge grants Onyango Okech Obama permission to remain in the U.S .