A family feud over who was going to take home the leftover cans of Sterno and food after a church wedding reception ended with one man fatally stabbing his cousin, police and sources said Monday.

Victim Juan Martinez, 58, suffered repeated knife wounds to his leg after the vow-renewal service at the Holy Spirit Catholic Church in University Heights in The Bronx on Sunday night, police and sources said.

Martinez later died at St. Barnabas Hospital, and the suspect — his cousin — is in custody and being questioned by cops, police said.

“They fought about who was going to take the cans of Sterno, which was being used to heat food at the ceremony,’’ and the leftover goodies, an NYPD spokesman told The Post.

NYPD Chief of Detectives Robert Boyce added, “We have a person in custody, and we are speaking to him. It is early on in the investigation, but we feel confident that we have the right person.”

Martinez and his attacker were in the church’s gym for the reception after the service when the knifing occurred around 9 p.m., sources said.

The actual vow renewal had taken place earlier in the adjoining church.

A man who lives next to the church told The Post on Monday, “They are supposed to be praying, not killing, in church. … That’s crazy. That’s a sad thing to happen.”

Additional reporting by Leonica Valentine