Baltimore County Executive Kevin Kamenetz (D) with supporters after he launched his gubernatorial campaign in September. (Brian Witte/AP)

Baltimore County Executive Kevin Kamenetz died before learning the truth.

The 60-year-old gubernatorial hopeful took pride in and was focused on every task he undertook, family and friends said, including a garden plot he tilled and from which he gleefully plucked ripe tomatoes and crunchy cucumbers.

The pumpkins, however, weren’t doing so well.

But then one day, a plump orange gourd appeared in the patch to Kamenetz’s great delight. He couldn’t help but share photos on social media and tell his friends. What Kamenetz never found out was that his wife, Jill — propelled by a mix of pity and expected amusement — had bought the pumpkin and carefully placed it among the vines.

Not she nor her two teenage sons ever got the chance to reveal their caper to their father and laugh about it, recalled Rabbi Andrew Busch during a funeral for Kamenetz at the Baltimore Hebrew Congregation in Pikes­ville.

The county executive suffered a cardiac arrest at his Owings Mills home on Thursday and died within a few hours at a hospital.

Baltimore County Executive Kevin Kamenetz’s flag-draped casket sits in the Baltimore Hebrew Congregation where his funeral was held on Friday. Kamenetz died suddenly Thursday morning of cardiac arrest. (Lloyd Fox/Baltimore Sun)

It was a swift and shocking demise for a career politician with aspirations for Maryland governor, a man who put most of his energy in the past year into a grueling campaign schedule that had Kamenetz crisscrossing the state from forum to fundraiser and back home.

“I told him, ‘This campaign is killing you,’ ” Jill Kamenetz told more than 500 political leaders, friends and family members gathered around her husband’s flag-draped coffin. The Kamenetzes had postponed family celebrations until after the election, a decision she said she now regrets.

Two of his closest friends eulogized Kamenetz, stunned they were standing amid a crowd of mourners. “We shouldn’t be here today,” said Charles Klein, a former campaign treasurer for Kamenetz who met him when they were both members of the Young Democrats in college.

Fellow attorney Rob Hoffman described Kamenetz as an extremely confident man who enjoyed a good debate and often offered unsolicited but salient advice. No matter how busy he became, Kamenetz pushed everything off his schedule to take his boys to school every morning.

“I owe every aspect of who I am to him,” said Kamenetz’s oldest son, Karson. “I hope he died knowing he was my role model. I hope he died knowing I loved him endlessly.”

Jill Kamenetz speaks at the funeral of her husband, Baltimore County Executive Kevin Kamenetz. Many of Maryland’s political elite were at the service. (Lloyd Fox/Baltimore Sun)

Kamenetz’s funeral brought together members of Maryland’s Republican and Democratic elite, including Democratic National Committee Chairman Tom Perez, Gov. Larry Hogan (R), Rep. C.A. Dutch Ruppersberger (D-Md.), Baltimore Mayor Catherine Pugh (D) and Sen. Benjamin L. Cardin (D-Md.) who delivered remarks calling his former colleague a “beloved member” of the state’s political family.

Mourners also included Kamenetz’s Democratic gubernatorial primary rivals — former NAACP leader Ben Jealous; Prince George’s County Executive Rushern L. Baker III; state Sen. Richard Madaleno (D-Montgomery); Krishanti Vignarajah, a former policy adviser to first lady Michelle Obama; tech entrepreneur Alec Ross and lawyer Jim Shea.

The crowded field of Democratic hopefuls are vying for the party nomination to challenge incumbent Hogan in November. His unexpected death will shift the dynamics of the June 26 primary.

He had amassed more money than the rest of the field, according to most recent campaign finance reports, and was poised to launch television ads in the Baltimore and Washington suburbs during the final two weeks of the race.

The county executive staked his candidacy on his track record in Baltimore County, where he grew up. As a teenager, he worked the cash register in his father’s drugstore in Overlea, Md.. He was elected county executive in 2010 and was nearing the end of his second term.

Kamenetz was also remembered as an intelligent and moral politician guided by his Jewish faith to make fair decisions that would benefit all county residents, friends said. He toiled in his garden the same way he led his constituents, friends said, with care, passion and sincere affection for the work and a willingness to roll up his sleeves. And he did the work because Kamenetz wanted his sons to inherit a better future, friends said.

“He was much more proud of you three,” said Klein, facing Kamenetz’s wife and sons in the front pew, “than he was of any of his political accomplishments.”

Correction: Earlier versions of this article gave an incorrect location for the grocery store owned by Kevin Kamenetz’s father. It was in Overlea, Md. The article has been corrected.