SAVANNAH, Ga. – Thomas J. Woods joined the military after graduating from an all-black high school in 1950, when Jim Crow laws forced him to the back of buses and Savannah shop clerks would greet him with a surly, “What you want, boy?”

But in Marine Corps boot camp and then the front lines of the Korean War, the 18-year-old saw the rigid color barriers of civilian life smashed in front of him as the military followed a mandate to end segregation of its ranks. That major social change, carried out in wartime, has echoes in today’s debate about whether to end a ban on gays serving openly.

On his first day of training, as the only black recruit among 42, Woods was stunned when an instructor ordered his platoon to treat him as an equal. They all wore green, the instructor barked, and they’d all bleed red.

“I said, ‘I don’t believe this,’” recalls Woods, 78, a retired postal worker in Fayetteville, Ga. “It gave me a lot of pride, that you are somebody. When you go in there, you think you’re nothing. Blacks were always last at everything.”

MILITARY LED THE WAY

The stories of Woods and other black veterans who served among the military’s first desegregated units during the Korean conflict may bear lessons at a time when Americans are debating an end to “don’t ask, don’t tell.” The 1993 policy that bars gays from serving openly in uniform has been challenged by a federal court and President Obama and is under review by the Defense Department.

Though the military may now seem to lag behind America’s acceptance of gays in civilian life, the armed forces led the charge in ending racial segregation in the 1940s and 1950s.

Efforts to integrate the ranks began right after World War II, culminating with President Truman signing a 1948 executive order banning racial discrimination in the military.

The job wasn’t finished until the Pentagon disbanded its last all-black units in 1954. Still, that was at a time when the modern civil rights movement was just building momentum. Five months earlier, the Supreme Court had issued its landmark ruling ordering an end to segregation in America’s public schools. Bus boycotts in Montgomery, Ala., began in 1955.

In other words, the military succeeded with desegregation when a huge proportion of Americans remained hostile to the idea of blacks and whites sharing schools, lunch counters and water fountains — or barracks and foxholes.

“This was a huge change forced upon the American population coming of age,” said Steven Schlossman, a Carnegie Mellon University historian and co-author of the book “Foxholes and Color Lines: Desegregating the U.S. Armed Forces.”

“Its challenge to Jim Crow was enormous and maybe a shock to many young soldiers.”

Blacks served in every U.S. military conflict beginning with the American Revolution, but in separate units that were often poorly trained and poorly equipped. White officers were commonly ordered to lead black units as punishment.

Arguments today in favor of keeping the Pentagon’s “don’t ask, don’t tell policy” — that openly serving gays would disrupt morale and erode the cohesion of combat units — echo those used to defend military segregation along racial lines, said Marcus S. Cox, a historian at The Citadel in Charleston, S.C.

“Many people used that same argument against African-Americans serving in the same units as whites,” said Cox, who teaches black military history to Citadel cadets. “Many people said, ‘It’s the end of the military.’ But the result was there were very few problems, the military ran very efficiently.”

‘IT WASN’T THAT BIG A DEAL’

The integration of blacks into all-white units in Korea was so uneventful that white soldiers like Phil McCraney hardly noticed. McCraney, 78, says his Army company of 150 troops had only four or five blacks by the time he returned home in 1951.

“It wasn’t that big a deal, I don’t think,” said the Bartow, Fla., man. “We didn’t mistreat them by any chance. But we just didn’t associate with them that much.”

The battlefield pressures of war were what ultimately pushed the armed forces into full-scale desegregation.

The Navy had begun integrating crews aboard its warships in 1946, but the Army and Marines resisted even after Truman’s 1948 order. They came around only after suffering heavy combat losses in Korea in 1950.

U.S. forces in Korea saw casualties escalating among all-white units faster than they could get replacements to the front lines. Commanders realized they could move up troops from black units, who had been relegated to support roles, faster than getting white reinforcements. Some white troops were moved into black units as well.

“Our commander made a very simple statement: When a rifleman comes in with a certain skill, put him where he’s needed,” recalled retired Army Lt. Gen. Julius Becton Jr. “We became an integrated regiment.”

Becton, 84, of Springfield, Va., deployed to Korea in 1950 as a platoon leader in the all-black 3rd Battalion, 9th Infantry Regiment. Then a lieutenant who had served in World War II, it wasn’t long before he was commanding white soldiers.

If there was resentment among the white soldiers taking orders from him, Becton insists he never heard it.

“I suspect there may have been some of that, but you don’t have much choice when you’re being shot at,” he said.