John Kerry came to the Oak Bluffs Tabernacle Saturday night with a message of optimism about the future of the country.

“I’m convinced that one of the great things about our nation is that our founding fathers put together institutions that work better even in these difficult times. And I have faith in them,” the former Secretary of State and Chilmark homeowner said.

Hundreds turned out for screening of documentary The Final Year. — Mark Alan Lovewell

Mr. Kerry joined hundreds of viewers after a screening of the documentary The Final Year for a wide-ranging discussion with Martha’s Vineyard Film Festival executive director Thomas Bena.

He recalled the corruption and unrest that plagued the United States government in the late 1960s and early 1970s, when he was actively protesting the war in Vietnam, and said the country has a history of overcoming hard times. “Our country became stronger, and our institutions became stronger too,” he said.

The documentary, shot in 22 countries and directed by Greg Barker, follows a group of president Obama’s top advisors and architects of United States foreign policy during his last year in office.

From the stage after the screening, Mr. Kerry said withdrawing from international agreements and negotiations like the Trans-Pacific Partnership, the Iran Nuclear Deal, and the Paris Agreement has left the United States in a position of isolation while the rest of the world continues to collaborate.

He said pulling out of the Iran nuclear deal broke trust with that country’s leaders and warned that a regime change in Iran could further destabilize the region. The deal was a hallmark of his tenure as Secretary of State.

“What we have actually wound up doing inadvertently is giving to other countries control over what strategic military decision we may have to make,” Mr. Kerry said. “We’ve lost our place at the table.”

Mr. Kerry called on people to get engaged: “It’s pretty straightforward. We have to reclaim our own democracy, folks.” — Mark Alan Lovewell

He said climate change poses a grave threat to the nation, and he lauded individual states that have elected to adhere to the 2016 Paris Agreement. He said last year’s devastating hurricanes Harvey and Irma are harbingers of what is yet to come as temperatures continue to rise.

He said the Paris Agreement sent a message to the private sector that renewable energy would be the way of the future, a message that has since been diluted.

“We’re losing the momentum and we’re not at the table to lead the greatest market the world has ever seen: the energy market,” he said.

On the divisive state of the country, Mr. Kerry said liberals must find common ground with those who voted for President Trump.

“You have to agree with them a little bit,” he said. “Don’t label folks. Don’t push them away and into a corner. They have a lot of legitimate gripes.”

He said both Democrats and Republicans share responsibility for the immigration crisis and for Congress’s inability to pass a balanced budget.

“I understand the anger and frustration,” Mr. Kerry said of those who voted for Donald Trump. “Government isn’t responding.”

Above all he called on people to get engaged, bemoaning voter turnout in American elections.

“It’s pretty straightforward. We have to reclaim our own democracy folks,” he said to applause.

In a moment of levity, Mr. Bena asked what made Mr. Kerry come to his senses and move to the Vineyard from Nantucket.

“I realized I could go longer between haircuts,” Mr. Kerry said. He noted that he has always visited the Elizabeth Islands, the Vineyard, and Falmouth. “I’m home. It’s nice,” he said.

During the conversation, a summer firefly made its way under the Tabernacle roof, a yellow light blinking in the rafters.

As Mr. Kerry was leaving the Tabernacle, 15-year-old Paris Noble stopped him to ask for advice on how to prepare to become a globally engaged citizen.

Mr. Kerry paused for several minutes to talk with her about his experience as a young activist and organizer.

“Back in 1972 we targeted the 12 worst congressmen on the environment,” he said. “In those elections, seven of the 12 lost their seats. The result was Clean Air Act passed, Marine Mammal Protection passed, coastal zone management, safe drinking water, the EPA. It all came out of citizen activism… You have to fight for it.”

A small crowd had gathered around them. Mr. Kerry looked Paris in the eye.

“So can I count on you?” he asked.