Greenwich hedge fund mogul David Stemerman ended his bid for governor with a hefty cushion — and a big check to himself.

He repaid himself $6.3 million of the $10 million loan he made to his campaign in June, the latest campaign finance reports show and receiving roughly half of the total $13 million he invested in his attempt to become governor.

Stemerman spent about $6.7 million on the race, far more than any of his competitors on either side of the aisle. Most of that cash went toward advertising and consulting services. To put that into perspective, candidates that participate in the state’s public financing program receive $1.35 million for the primary and, if they win, about $6 million more for the general election.

Meanwhile, Mark Boughton, the party-endorsed candidate who was defeated by political first-timer Bob Stefanowski, ended his campaign with roughly $31,000 on hand.

Boughton, the mayor of Danbury, participated in the state’s public campaign financing program, which provides a $1.35 million grant for campaign expenses but limits total spending on a primary campaign to $1.6 million. Boughton spent about $124,000 on the campaign between Aug. 8 and 31, and roughly $1.47 million overall.

Bridgeport Mayor Joe Ganim raised $840,708 in his unsuccessful bid for governor, and spent all but $167.57 trying to wrest the Democratic Party’s endorsement from Ned Lamont at the polls Aug. 14. Ganim’s campaign has not yet repaid the candidate’s $60,000 personal loan, or $3,500 he chipped in to keep the campaign in the black during the last days of his run.

As of Thursday afternoon, Stemerman, Boughton and Ganim were the only candidates to have turned in their post-primary finance reports. The rest are due by midnight Thursday.

David Walker, a former Comptroller General of the United States, failed to garner enough delegate support at the state Republican convention to earn a spot on the primary ballot, also filed his campaign termination report this week. He spent about $266,000 on his campaign and ended with $1,300 on hand.

kkrasselt@hearstmediact.com; 203-842-2563; @kaitlynkrasselt