David Mackiewicz, a Middleborough native and police lieutenant, has retired after almost 34 years in the department. Chief Bruce Gates said Mackiewicz had fulfilled a childhood dream of being on the force, following in the footsteps of several relatives. Mackiewicz rose from auxiliary officer in the 1970s to police officer in 1980, sergeant in 1983, detective sergeant in 2001, and lieutenant in 2006. He was instrumental in solving the Leann Ryba murder case, Gates said, referring to the discovery in May 1985 of the body of the 17-year-old high school student who eventually was found to have been sexually assaulted and killed by a Freetown man. “David was also cited for saving several children in an early-morning house fire at Woods Pond in the late 1980s,’’ Gates said. “He was very dedicated and loyal to the profession and department his entire career.” Gates said he will recommend to selectmen that Detective Sergeant Joseph Perkins be promoted to Mackiewicz’s position.