Danbury Mayor Mark Boughton suffered a medical episode on Thursday night while attending a fundraising event.
Boughton, a Republican contender for governor, was at a meet-and-greet in Avon when he collapsed.
He was taken to the University of Connecticut Medical Center in Farmington.
On Friday, he was released from the hospital, according to sources close to the mayor.
UConn Health officials said the mayor was treated for dehydration.
Other Republican candidates were at the event on Thursday, including fellow candidate and doctor Rep. Prasad Srinivasan, who administered CPR to Boughton.
"He was breathing, but his pulse was extremely weak, so I began chest compressions and immediately the pulse came back," Srinivasan said.
A statement was sent out by Boughton's campaign staff Thursday evening.
"Danbury Mayor Mark Boughton fell ill at an event in Avon [Thursday] evening," the statement said. "He is currently resting comfortably at UCONN Health Center in Farmington."
Eyewitness News spoke to Srinivasan over the phone, who said "My wife said to me, 'run, run' and I just ran because I didn't know where I was going and she directed me as to where to go and I go there and I find Mark on the floor seizing," he said.
Boughton underwent surgery to have a brain tumor removed last summer.
"Life is bigger than any election. Our first job is to make sure we take of each other," Srinivasan said.
Copyright 2018 WFSB (Meredith Corporation). All rights reserved.