SALEM – A Mattapan father who admitted pointing a gun in a security guard’s face after firing several shots in the parking lot behind the Tabu nightclub in Saugus in 2009 is headed to state prison for three years.Ludwin Midence, 35, of 430 River St., #24, Mattapan, was about to go on trial in Salem Superior Court but instead opted to plead guilty in a deal worked out between Assistant District Attorney Kristen R. Buxton and defense lawyer Christopher P. Belezos.Midence pleaded guilty to charges of assault with a dangerous weapon, carrying a firearm without a license, possession of ammunition and discharging a firearm within 500 feet of a dwelling before Judge David A. Lowy.In addition to the three-year state prison term, Midence also received two consecutive sentences for two years in the House of Corrections on the firearm and ammunition charges and another 90 days in the House of Corrections for discharging a firearm within 500 feet of a building, but all those penalties will run simultaneously, not one after the other, with the three years in state prison.Lowy adopted the joint recommended sentence proposed by Buxton and Belezos on Tuesday morning.The charges arise out of an incident on May 10, 2009 in Saugus.It was around 1:45 a.m. when shots were fired in the rear parking lot at the Tabu nightclub, located on Route 1 in Saugus.Saugus Police Sgt. Anthony LoPresti working a paid detail heard a loud bang coming from the rear of the club and immediately called police for backup.In the meantime, one of the club security guards said the shooter had pointed a gun in his face as he ran from the scene.A description of the vehicle, a blue Honda Odyssey mini van, was relayed to police responding to the scene. Authorities quickly caught up with the Odyssey mini van and pulled it over across the town line in Lynnfield.Police said they found seven rounds of ammunition in the van.Midence, the driver of the van, was placed under arrest and later identified by the security guard as the person firing shots.The judge credited Midence the 122 days he had spent in jail in lieu of bail awaiting trial.