Alfred Olango, 38, of El Cajon was convicted of transporting and selling narcotics and ordered in 2002 by an immigration judge to be deported, according to an ICE statement.
Immigration officials said they tried unsuccessfully multiple times to obtain travel documents from the Ugandan government so he could be deported.
Unable to send him back to his native country, ICE officials released Olango in 2003. He was placed under supervision due to a Supreme Court ruling that forbids the detention of foreign nationals with final deportation orders for more than six months if they cannot be deported "within the reasonably foreseeable future."
"This is often due to a foreign government's refusal to accept the repatriation of its nationals," ICE said.
The supervision order required that Olango report to immigration officials regularly.
Then in 2009, Olango returned to ICE custody after he was convicted and served time in prison for a firearms offense in Colorado.
Again, immigration officials tried to obtain travel documents from Uganda to deport Olango.
"Once again the attempts were unsuccessful, leading to Mr. Olango's re-release from ICE custody on an order of supervision," ICE said.
Olango was reporting regularly to immigration officials until February 2015, when he failed to show up for an appointment, and immigration officials had not had contact with him since, ICE said.
According to ICE, Olango arrived in the U.S. in 1991 as a refugee.
Friends of Olango say he was struggling with a personal loss when an El Cajon police officer shot and killed him Tuesday.
Olango had been behaving in an erratic manner immediately before the shooting, and his sister told police he was "mentally sick."
Friends and relatives say that at the time of the shooting, Olango was still reeling from the death of a close boyhood friend and fellow African refugee, 31-year-old Bereket Demsse.
"He was just so depressed," said Vicky Ellis, Olango's former girlfriend, who spoke with Olango last weekend. "I'd never heard him so upset."
Demsse had died suddenly on Sept. 23 and was buried Wednesday afternoon — less than 24 hours after Olango's death.
Olango claimed to be 38, with a birthdate of July 17, 1978. Yet Ellis said those may have been estimates. Due to the chaotic conditions of his early life, she noted, he lacked a birth certificate.
He was born into a Uganda ruled by Idi Amin, whose bloody reign led to a period of guerrilla warfare.
Seeking a better life, the family fled their native land and endured privations and horrors in refugee camps, a relative said.
"We saw dead bodies, atrocities, and it built character," one of Olango's brothers told the Rev. Shane Harris, a San Diego pastor who interviewed the sibling Wednesday. "It made us want something better and acquire the American dream together."
One lasting souvenir of the camps: Olango's feet were scarred from years of walking across rugged terrain without shoes.
The family settled in San Diego more than 20 years ago, said Walter Lam, executive director of the Alliance for African Assistance, a City Heights nonprofit organization.
"The children went to the Catholic school on 56th Street," Lam said, referring to Blessed Sacrament Parish School. "Then the family moved to Golden Hill."
Soon, though, Alfred's life spun out of control. His juvenile record included several misdemeanor charges. He dropped out of San Diego High School. In 1999, he was convicted of receiving stolen property. A 336-day sentence was waived, thanks to time he had spent in jail awaiting trial.
Two years later, he was sentenced to 364 days in jail for peddling cocaine.
Olango moved to the Denver area, where his brushes with the law continued. He was driving through Aurora, Colo., on New Year's Eve 2005 when police pulled him over. At his feet was a 9-millimeter semiautomatic pistol.
As a felon found to be in possession of a firearm, Olango was sent to federal prison. He was released in August 2009, moving to La Mesa and spending the next three years on probation.
Over the next seven years, he racked up a few traffic tickets, appeared in a small claims case that was dismissed and was named in two civil cases.
Friends, though, say he had settled down. He was polishing his culinary skills as a chef for the Saddle Ranch Chophouse in Glendale, Ariz., and a series of Hooters restaurants in the Phoenix area and San Diego County.
His last Facebook post, June 17, shows the 5-foot-6 man on the beach in Coronado. The page identifies him as "Former God's Servant at Jesus Daily."
"He was just so happy," said Ellis, the former girlfriend. "They called him 'Little Kevin Hart' because he was always making people laugh."
The Olangos are a tightknit family, said Ellis, who dated Alfred for five months. They were living together in Chula Vista when the couple underwent an amicable breakup in January.
"He comes from a good family," she said. "His mother was his queen. He loved her to death."
The father of two girls, Olango was good with children, said Anna Diaz, Ellis' 24-year-old daughter.
"I have two little ones of my own and he loved to be around kids," she said.
Ellis and Diaz insisted that Olango was not mentally unstable.
"He was not mentally disabled," Ellis said. "But one of his best friends had just died and he was going through a lot of pain with that."
Lam, who last saw Olango three months ago at a funeral for another refugee, agreed.
"He was a healthy man," Lam said.
Olango's brother told told Harris' online radio program, "Get on Up," Alfred "wanted to do right, wanted to do good." His ambitions included one day serving African specialties in his own restaurant.
The brother told Harris that he spoke with Alfred on his last day. Alfred, who had agreed to drive his brother to the airport, noted that he was short of gas money.
Soon after, spectators called police and reported a man walking in the middle of a street, behaving erratically. The ensuing confrontation ended when Olango assumed what police describe as a shooting position, pointing an object at one of the officers.
Both officers fired simultaneously, one with a firearm, the other a Taser. Olango died of his wounds.
"This is one of the most brutal pains I've ever had to deal with in my life," said the brother, who was never identified by name in the interview. "I hope to God no one else has to go through it."
He added that the family encourages protesters to be peaceful, demanding police reforms and accountability.
The image of Olango that many saw this week is taken from a single frame from a video, showing a tense and ultimately tragic showdown with police. The dead man's brother cautioned against mistaking this snapshot for the complete picture.
"They don't have the right paintbrush," he said. "You can't paint the right painting without the right paintbrush. They haven't spoken with anyone who knows him, anyone who knows his journeys."
Rowe writes for the San Diego Union-Tribune. Staff librarian Merrie Monteagudo and staff writers Kristina Davis, David Hernandez, John Wilkens and Lyndsay Winkley contributed to this report.
2:20 p.m.: This article was updated with details from Immigration and Customs Enforcement about attempts to deport Alfred Olango.