Until he was 14, Willie Wilson Goode slept two, three, sometimes four in a bed in a wooden shack with no electricity or indoor toilet on a small farm in the North Carolina tobacco belt.

His parents were sharecroppers, their grandparents slaves. Starting at age 6, Goode rose at daybreak in the spring and fall to pick cotton or tobacco or push a mule-drawn plow; in the summers and winters he attended a segregated, one-room schoolhouse. His parents couldn't eke out a living. In 1954, they collected their seven children and joined the era's great migration of blacks from farm to factory, from South to North.

What unfolded over the next decades is a classic American bootstrap biography, culminating, for now at least, in Goode's solid, 7-point victory over former mayor Frank L. Rizzo in the Democratic mayoral primary Tuesday. With 98 percent of the vote counted, Goode had about 312,219 votes, or 53.6 percent, to 270,115, or 46.3 percent, for Rizzo, with about 20,000 votes to Frank Lomento. Goode will face John Egan, a long-time Democrat and chairman of the Philadelphia Stock Exchange, who switched parties to defeat former representative Charles F. Dougherty and former city controller Thomas Gola in the Republican primary. Egan won 38,920 votes, or 54 percent, Dougherty got 25,413, or 29.6 percent, and Gola got 21,581, or 25.1 percent.

When he arrived in west Philadelphia, just a few blocks from the row house where he lives now, Willie Goode got his share of teasing. He was a southern hick with a bad speech impediment that today, almost 30 years later, he still has not mastered fully. He tended to swallow his words, and words that end in "th" would end with an "f."

His father, who could not read or write, got a job in a box factory in west Philadelphia, and the local high school guidance counselor told young Goode that he, too, was cut out for factory work. She told him to take industrial arts, not academic courses, and that stoked a fire.

"I always remember that ringing over and over in my mind," he recalls with that flat, unemotional doggedness that characterizes so much of what he does. " 'You can't make it, you can't go to college.' I was determined to prove she was wrong."

Young Goode graduated from high school and went to work briefly as a cart-pusher in a cigar factory, but decided that "The Lord placed me on this earth to do something more than make cigars and push carts." So he became the first member of his family to go to college at Morgan State, and he traded "Willie" for "W." He fulfilled his ROTC obligation as a military police lieutenant in the Army.

He considered the Baptist ministry, but elected a career in public service instead--a degree in public administration from the Wharton School, director of a nonprofit group that provided technical assistance to community groups seeking federal housing funds, first black chairman of a state public utility commission, first black managing director of Philadelphia--and next January, he hopes, the city's first black mayor.

"Wilson traveled a long way in a short time," said Bernard Watson, president of the William Penn Foundation, one of Goode's few close friends, "and it put steel in his spine."

It also generated an appetite for the 16-hour work day, a single-minded will to get ahead and a personal stiffness and reserve. "You don't be the first one to launch out there and don't make it," Goode said. "Everyone back home is rooting for you. So you've just got to make it."

Goode is something of an anomaly in politics. Not many public officials say while they are in office that their burning ambition in life is to become a corporate chief executive.

Goode's aloof style also seems ill-suited to the rough-and-tumble of city politics and his tendency to swallow some of his words, a vestige of the speech impediment from his youth, makes him an unlikely figure on the stump.

But he was the unanimous choice of black political leaders, as disenchantment with Mayor William J. Green over minority issues, including the low percentage of blacks on the police force, increased pressure for a black candidate. "It was the hardest thing I have ever done," he said of the day he resigned as city managing director.

Goode got mixed reviews for his three years as head of the city's 10 operating departments in Green's administration. The rap on him was that he was too much of a "fireman"--too consumed by daily detail. His aloof, distant manner also left some feeling he was not good at motivating subordinates. Yet he got high marks for integrity.

On the campaign trail, he knows the uses of symbolism. Once, during a news conference at Temple University, Goode stopped in mid-sentence when he realized that most of the people sharing the podium with him were blacks. He directed some of them off the stage and brought some of his white supporters into the camera's view, all without uttering a word. Then he resumed.

And he is keenly aware of his status as a role model. "It is important that people see the first black managing director as someone capable, intelligent and most of all fair," he said. "Fair to whites, fair to blacks, fair to Hispanics, fair to the whole city."