SAVANNAH, Ga. (AP) — 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.”

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 Barack Obama and is under review by the Pentagon.

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 '50s.

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

The job wasn't finished until the Defense Department 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  public schools. Bus boycotts in Montgomery, Alabama, began the following year.

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.

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

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 McCraney of Bartow. “We didn't mistreat them by any chance. But we just didn't associate with them that much.”

It was the battlefield pressures of war that ultimately pushed the armed forces into full-scale desegregation.

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

As America debates “don't ask, don't tell,” the draft is no longer a factor in the all-volunteer military.

Cox from The Citadel says that acceptance of gays in uniform challenges ideas about strength and manhood that are entrenched in military culture, more so than the expanding military roles for women since the draft ended in 1973.

For any minority group facing discrimination, Cox said, military service has been seen as a major step toward equality.

That was the case for Woods, who returned from Korea to the U.S. on leave in 1952 after being promoted to sergeant. When Woods got on a bus in Miami, he took a seat up front.

“I sat right behind the driver,” Woods said. “He looked at me, but I stayed because I had my uniform on. I had Uncle Sam backing me up.”