When Jeh Johnson, a member of President Barack Obama’s cabinet, distinguished attorney and summer visitor to Martha’s Vineyard for more than five decades, stepped forward in the pulpit of Union Chapel Sunday, the congregation threatened to burst the old octagonal walls of the historic Oak Bluffs chapel.

Prayer before event began at historic Oak Bluffs chapel. — Jeanna Shepard

Every seat in the pews was taken, the balcony was full and more than a few stood in the back.

Among the notable people in attendance were Louis Sullivan, former Secretary of Health and Human Services, U.S Customs and Border Protection Commissioner R. Gil Kerlikowske, former Massachusetts Attorney General Wayne Budd, and John Wilson Jr., president of Morehouse College.

Mr. Johnson is the Secretary of the Department of Homeland Security, a cabinet level position created following the 2001 attacks on the World Trade Center in New York city and the Pentagon in Washington, D.C. The position is the culmination of a lifetime of public service and leadership.

Mr. Wilson and Mr. Johnson were classmates at Morehouse and rivals in a 1979 election for class president. Secretary Johnson engaged in some good natured one-upsmanship with his friend when he told the story of losing that election.

“In a vote of 43 to 27 — I still remember that vote,” he said. “Looking back on it now, I am so glad I lost that election. I did not appreciate then, that when you are elected senior class president, you are elected class president for life. Nor did I appreciate then, what John told us all in 1979, that this leadership of the class of 1979 would set him on a trajectory to be president of Morehouse College.” He continued with a wry smile: “Yes, I was bitterly disappointed. But I got over it. Instead of being president [of the senior class], I settled for being a member of the president’s cabinet.”

Mr. Johnson said he is often asked to speak in public, testify before Congress, or appear on television news programs. But until Sunday, he had never been asked to speak from a pulpit and deliver a lay sermon. He framed his sermon around his deep attachment to the Vineyard, a place he said he has long cherished as a respite from his relentless responsibilities in public service.

Jeh Johnson spoke of his affection for the Vineyard, and the delicate balancing act of national security. — Jeanna Shepard

“My family and I have been coming here for 54 years,” he said. “During that time, so much about this Island has stayed the same, but so much of our nation and our world has changed. This place, which stubbornly refuses to accept a traffic light or a fast-food restaurant, has been our Island of stability and continuity. No matter what happens to us in our world over there on the mainland, we know when we come back next year there will be the Flying Horses, clam chowder on the ferry, the cheddar cheese bread and chocolate doughnuts at the bakery next to the post office, Illumination Night, and fireworks.”

He drew smiles with his all-too familiar description of the drive to the Vineyard every summer: “The rising sense of excitement you feel as you cross the Bourne Bridge onto Cape Cod, the last-minute dash down the two-lane stretch of Route 28 to Woods Hole and the ferry . . . . and the huge relief you feel when the guy in the red shirt at the guard house checks for your reservation and utters the final verdict in a thick Boston accent: Lane four, right behind the blue Jeep. Stay with your vehicle.”

He recalled every house his family had rented in Oak Bluffs during those summers, right down to the street address, associating those houses with events that shaped his life. One was a house on Chestnut avenue, which his family rented in 1967.

“I was five years old then,” he said. “That summer, as my little sister and I occupied the sandbox in the backyard, Martin Luther King occupied a jail cell in Albany, Ga., Charlayne Hunter [who was seated in a front pew] and Hamilton Holmes had just desegregated the University of Georgia, and James Meredith was fighting to desegregate the University of Mississippi.”

“History teaches us that dangerous, overheated rhetoric has consequences." — Jeanna Shepard

He also said he associated the summer of ’67 with the release of the movie Guess Who’s Coming to Dinner, the fictional story of a young white woman and an older African American man who meet at a university in Hawaii. She brings him home to meet her parents. When the movie was released, interracial marriage was illegal in 17 states.

Secretary Johnson said he recently watched the movie again, and took note of a scene he had forgotten in which the father, played by Spencer Tracy, is having a talk with his future son in law, played by Sidney Poitier. He quoted the scene.

Tracy: “Have you given any thought to the problem your children are going to have?”

Poitier: “Yes and we’ll have children.”

Tracy: “Is that how Joey feels?”

Poitier: “She feels that every single one of our children will be president of the United States, and they’ll have colorful administrations.”

Secretary Johnson was struck by the uncanny irony.

“In fact, at that moment, there was already a six-year-old boy who was the child of a white woman and an older black man who had met at a university in Hawaii and married. And that young man is now the President of the United States. And I can tell you first hand he has a colorful administration.”

An early supporter of President Obama, he recalled meeting the future president in 2006.

Crowd gathered to greet and shake hands with distinguished visitor following sermon. — Jeanna Shepard

“Something told me then, that I was being asked to take a ride into history, and that I better get on board that bus,” he said.

Returning to present-day affairs, Mr. Johnson reminded the audience that homeland security is a balancing act. He said he could create a perfectly secure world for each American citizen, but it would seem like a prison.

“We can build more walls, install more screening devices, surveil and interrogate a lot more people and make everybody suspicious of those different from ourselves,” he said. “But go too far, and it will cost us who we are as a nation of people who cherish our privacy, our freedoms, our religions and our diversity. National security and homeland security involve striking a balance between basic physical security on the one hand, and the law, the freedoms, and the values we cherish as Americans on the other. Those of us involved in national security must be the guardians of one as much as the other.”

He touched briefly and indirectly on the current political climate, placing it in contrast with the advances in racial and religious relations that he said were unimaginable 50 years ago.

“In our public dialogue, we now hear questions about someone’s suitability for office based on religion, suitability to be an impartial judicial officer based on immigrant heritage, calls to ban immigrants from this country based on religion, and intolerance for dissent. Today’s dialogue would have been unimaginable just one year ago,” he said, adding:

Secretary of Homeland Security strolls down Kennebec avenue in Oak Bluffs. — Jeanna Shepard

“History teaches us that dangerous, overheated rhetoric has consequences. History teaches us that fear, recrimination, suspicion and prejudice breed government overreach.”

Secretary Johnson finished his talk with a poignant anecdote about his grandfather, a distinguished sociologist who did not live to see desegregation take root. Dr. Charles Johnson was called to testify before the House Un-American Activities Committee at a time when political figures led by Sen. Joseph McCarthy cast damaging suspicion on many people in academia, entertainment and government with insinuations they sympathized with Communists.

The hearings were held in room 311 of the Cannon House Office Building on Capitol Hill. Secretary Johnson is familiar with the room.

“Sixty-seven years ago, my grandfather likely testified in that hearing room to defend his patriotism,” he said. “The week after next, his grandson, the Secretary of Homeland Security, will testify in that same room to explain what the U.S. government is doing to defend our nation. I think Granddad would be proud. We will always have faith. We will never lose hope. God bless you. God bless America.”

The congregation at the chapel rose in unison with sustained applause, not sitting down again until Secretary Johnson took a curtain call of sorts from the pulpit to acknowledge the cheers. After greeting many admirers who wanted a word, a handshake or a picture, the U.S. Secretary of Homeland Security and his family walked out into a glorious day, and strolled down the middle of Kennebec avenue to get on with the rest of their Vineyard vacation.