Herman Boone, a trailblazing football coach who led Alexandria’s T.C. Williams High School to a Virginia state championship in 1971 and was later portrayed by Denzel Washington in the Hollywood film “Remember the Titans,” died Dec. 18 at his home in Alexandria. He was 84.

The cause was lung cancer, said his daughters, Sharon Henderson and Monica Merritt.

In 1971, in the wake of the civil rights era, Alexandria sought to reduce racial imbalance in its public schools by merging its three high schools — George Washington, Hammond and T.C. Williams. As a result, T.C. Williams was the city’s only public high school for 11th- and 12th-graders that year.

Most people expected Bill Yoast, the coach at the nearly all-white Hammond High, to lead T.C. Williams’s football team. Instead, school officials chose Mr. Boone, an African American coach who had been an assistant coach at T.C. Williams and had previously compiled a remarkable coaching record in North Carolina. At the time, he was the only black head football coach in Northern Virginia.

Mr. Boone became a symbolic figure and told his players, he recalled to The Washington Post in 2000, “I’m not a black coach, I’m a coach who was born black. If you’re going to play for me, you’re going to play based on talent and character.”

At first, some white players said they would refuse to play for an African American coach. But when the Alabama-born Yoast agreed to become Mr. Boone’s top assistant, the two coaches formed a powerful and effective duo.

Mr. Boone was fiery, voluble and profane — “I cussed, but I never cursed a child,” he said — and Yoast was quiet and reserved. The bond they shared ultimately came to be reflected in the unity of their team, the Titans.

On a preseason training trip to Gettysburg, Pa., Mr. Boone noticed that the white players boarded one bus, the black players another. He ordered them to get off and share the buses equally. No one said a word on the trip, but it was a first step toward greater understanding.

In Gettysburg, Mr. Boone required every player to greet each of his teammates. Soon enough, the players were laughing and joking together and giving one another nicknames.

“When you nickname somebody, it’s out of friendship,” Mr. Boone later said. “We knew that we had the beginnings of a team that was trying to overcome their fears. Fears that were taught to them.”

The bus trip back to Alexandria was filled with laughter and team spirit.

“When you live together you become more than acquaintances,” Yoast, who died in May, told The Post in 2000. “When those kids came back from that camp, they were together. The student body wasn’t, the parents weren’t, the community wasn’t. But those kids were.”

On the field, the Titans were an unstoppable force. They swept through one team after another, shutting out eight of their 12 opponents on their way to the state championship game against Andrew Lewis High School of Salem, Va.

The Titans recorded their 13th consecutive victory and ninth shutout, winning 27-0. Some sportswriters considered them the best high school team in the country.

For Mr. Boone, however, the perfect season was only one aspect of the team’s success, and perhaps not the most important one. He recognized the changes that could be made in society through a team working together on the playing field.

“It’s the vehicle that transports people,” he said, “that carries people who are willing — whether they know it or not at the time — to eat together, talk together, sit together and live together. It’s the big bus that will carry us all.”

Herman Boone was born Oct. 28, 1935, in Rocky Mount, N.C., one of 12 children. His parents died when he was young, and he was largely raised by his older siblings.

He graduated in 1958 from North Carolina Central University, where he was not a star athlete but a keen student of teaching. He later received a master’s degree in physical education from the university.

He began his coaching career in Blackstone, Va., where he coached football, basketball and baseball before moving to E.J. Hayes High School, a segregated school for African Americans in Williamston, N.C. Over a nine-year period as an assistant or head coach, his football team had a record of 99-8. He came to T.C. Williams as backfield coach in 1969.

Mr. Boone retired from coaching football in 1979 but continued as a golf coach and physical education teacher for another decade.

When the screenwriter Gregory Allen Howard expressed interest in creating a movie about Mr. Boone’s perfect season with the Titans, “I thought it was a practical joke.”

But Howard saw something heroic in Mr. Boone and his team.

“Herman is Shakespearean,” Howard said in 2000. “If you’d asked Herman when he took over T.C. Williams, ‘Were you trying to make a point with these kids?’ he would have said, ‘No, I just want to win football games.’ He had to get the players to get along to win football games. And it worked for just that reason — because it wasn’t self-conscious. He did something quite great beyond what even he realized.”

Washington, a former high school quarterback, starred as Mr. Boone in “Remember the Titans,” which was produced by Jerry Bruckheimer and became a box-office hit in 2000.

Mr. Boone said the film took some liberties with the facts: It wasn’t a brick that was thrown through his window, for instance — it was a toilet. On the whole, he and Yoast agreed that the movie captured the spirit of the team and times.

“Little did I know,” Mr. Boone said, “that this wasn’t a movie about a state championship. It was about how human beings can come together, and a state championship was just the icing on the cake.”

His wife of 57 years, Carol Luck Boone, died in March. A daughter, Donna Dulany, died in 2014.

Survivors include daughters Sharon Henderson of Alexandria and Monica Merritt of Plymouth, Mich.; six grandchildren; and two great-granddaughters.

In recent years, Mr. Boone traveled throughout the country, often speaking on college campuses about “Remember the Titans” and the power of sports to transform the human heart.

“I don’t think people outside sports believe it,” he told The Post in 2000. “They don’t want to believe sports does that. They need to think again.”