A Twitter user's heart-warming story about working in the White House for Barack Obama is being shared across the internet.

New Mexico native and second generation immigrant, Gary Lee, wrote about his extraordinary rise from college senior to White House staffer at the beginning of the Obama adminisatration in a series of tweets.

Lee recounted an encounter with the president as he left his position as assistant staff secretary and moved to his parent's home country of Korea as a Fulbright scholar in 2011.

Upon learning of his loyal employee's departure, Obama learned the Korean word for hello and recited it to him as a parting message. Lee's post included a picture of the meeting which showed his obvious delight at Obama's thoughtful gesture.

Lee's tweets were intended to show the marked difference in attitude to immigration between Trump and Obama and the former president's power to inspire those around him.

"It says a lot about the man himself," Lee said, "but it also says how far we've come."

Lee wrote: "President Trump made a lot of upsetting remarks this week including this one. 'Where are you from?' is a question that many Asian Americans dread.

"This struck a chord with me not only bc I'm Korean-American, but also bc I worked at the White House, for President Obama. I left the WH in 2011 for a Fulbright scholarship in Korea. President Obama knew I was leaving to learn more about the culture and language of my parents."

Lee says the brief but moving gesture was enough to leave him and another staffer in tears.

He insists his story would only be possible in America and wants the country to remember the positive contributions immigrants make everyday.