PROVIDENCE, R.I. — A candidate for governor in Rhode Island had to be rescued by the Coast Guard on Sunday after his yacht hit a rock while blasting music at beachgoers to draw attention to his campaign.

Joe Trillo thanked first responders Monday for rescuing him and three others near Charlestown, Rhode Island. He said they hit a rock that wasn't charted and started taking on water.

The Coast Guard, which posted a photo on Facebook, said Trillo was 100 to 300 yards from shore.

The former Republican lawmaker running as an independent has said President Donald Trump inspired his gubernatorial run.

It was the second time this month he took his 65-foot (19-meter) yacht, the Lady M, out with a giant campaign sign while playing patriotic music and drawing complaints from some beachgoers.

Trillo was navigating a route that would pass by Rhode Island's largest beaches when the accident happened.

His strategy was to approach a beach and announce that if elected, one of the many things he would do is put garbage cans on beaches so beachgoers wouldn't have to carry their trash out in plastic bags. He'd play a John Philip Sousa march on what he describes as "very, very big sound equipment" before leaving for the next beach.

"You can hit 200,000 to 250,000 people in a day," he said. "How else can you do that without spending a lot of money?"

Trillo said he has heard mostly positive feedback and he thinks the complainers are supporters of his opponents. He hasn't decided whether he'll campaign from his boat again once it's fixed in about two weeks.

The Coast Guard said there are no federal restrictions they'd enforce on loud music and Trillo wasn't cited for anything related to the accident.