When Congressman John Lewis recently visited a class at Georgia Tech, the first things he did were to thank the students and ask their professor how long he had to address them.

It was a typically modest approach by Lewis, the civil rights icon who earlier that day had received the Ivan Allen Jr. Prize for Social Courage, which the school gives each year.

Once he got the preliminaries out of the way, his hour with the students in the “Global Issues and Leadership” class turned into an inspiring conversation about leadership, complete with stories from Lewis’s past and responses to his views on today’s political and social dilemmas.

It was remarkable to realize that Lewis became one of the civil rights movement’s most important leaders when he was about the same age as these students. He first emerged during the sit-in movement while a student at Fisk University in Nashville.

He was later one of the Freedom Riders protesting the segregation of interstate bus terminals. Lewis became a symbol of the civil rights movement when, after being beaten during a march on Edmond Pettis Bridge in Selma, Ala., he was interviewed while still bloody on national television.

During his give-and-take with the 25 or so students, Lewis used his recollection of these incidents to make points about leadership — and the realities and risks it carries.

“Leaders must be headlights, not tail lights,” he said. “You can lose your job. You may get hurt. That’s part of the price you pay.”

He emphasized the need for understanding and compromise in leadership, pointing out that there were disagreements among leaders of the civil rights movement, but they were focused on a big goal, not individual ambitions.

He urged the students to use words and language carefully, and he reminded them of the power of words by highlighting the role of the media during battles over segregation.

“If it hadn’t been for the American media … a free press, the civil rights movement would have been like a bird without wings,” he said.

He reminded the students that in a famous Birmingham, Ala., incident, a crowd attacked members of the press before the Freedom Riders.

“They tried to destroy the story,” he said. “Then they turned on the Freedom Riders.” (The class had watched a video about the Freedom Rides before Lewis spoke to them.)

Lewis urged the students to find their passion, and to follow it where it takes them.

He recounted how he first saw himself as a member of a cause he believed deeply in. Others began to see him as a leader before he thought of himself that way.

He then drew the Rev. Martin Luther King Jr. into the discussion. As he spoke of King, he told students to be mindful that King was never elected to office, yet he is depicted in a statue on the Mall in Washington, D.C., “because of his moral leadership.”

Lewis moved easily from recounting history to deeply personal stories to make his points.

His parents, he said, told him to avoid trouble when he asked about the signs that labeled things “white” and “colored.” He had difficulty following their advice.

“I was inspired,” he said. “I got in trouble. I call it good trouble.”

Lewis was able to take the students from the White House (where he was among a group of civil rights leaders who met with President John F. Kennedy) to the Alabama farm he grew up on (he practiced being a preacher before chickens; it’s one of his famous stories that everyone should hear) without ever losing them or wandering from his message.

He urged them forward and toward leadership and all the while answered their questions and connected to their world.

One of the students asked him to describe one of his more recent arrests — in 2009 over issues in Darfur during a protest at the Sudan embassy — while a member of Congress. He laughed about that arrest as he compared it to the brutal treatment during the civil rights movement.

“It’s different than being arrested in Selma,” he said. The handcuffs weren’t the heavy metal ones of the past, but rather plastic and comfortable.

“In Washington, it’s very polite and business-like,” he said.

He came back to the world’s need for leaders, and he called on the students to do so.

“You represent the very best” as students at Georgia Tech, Lewis said. “You have a mandate to lead.”