Ayub Hirsi Ali was at the Toronto Muslim Cemetery on Leslie Street in Richmond Hill on Thursday with 60 other people when shots rang out.
He and another 27-year-old man were hit by multiple bullets.
Police arrived and found both men and transported them to the hospital for treatment.
Ali was pronounced dead at the hospital a short time later.
Investigators said Friday that Ali has been charged in the 2015 shooting death of Kabil Abdulkhadir, 27, outside the Marriott Hotel on Bay Street in downtown Toronto.
The director of the cemetery, Sabi Asan, told CP24 that Thursday afternoon’s funeral was for Gidid Mohamed.
Toronto police previously identified Mohammed as the 27-year-old man who was gunned down outside a social club in the area of Lawrence Avenue and Weston Road early Tuesday morning.
Investigators have not arrested anyone in connection with the shooting, which also sent a 37-year-old man to the hospital with serious injuries. Police said Friday they are looking for three male suspects in the funeral attack. They left the scene in an SUV that was last seen heading north on Leslie Street. –With files from CP24’s Eden Debebe and Bryann Aguilar.