DETROIT—A firefighter from Los Angeles has been sentenced to 12 1/2 years in prison for flying to Detroit to have sex with a 5-year-old girl.

Brian Flaherty of Chino Hills, was sentenced Wednesday in U.S. District Court in Detroit. The 38-year-old pleaded guilty in October to enticing a minor for sex and transporting child pornography.

U.S. Attorney Stephen Murphy says Flaherty had several online and phone conversations with a woman he thought was a single mother with two young children. He also e-mailed child pornography to the woman, who turned out to be an undercover detective.

Flaherty was arrested in February of 2007 when he arrived in Detroit to meet the girl.