As George Wallace basked in the afterglow of his narrow victory in the Democratic gubernatorial primary runoff Tuesday, his strategists were taking aim at the tough Republican he must beat in November to win an unprecedented fourth term as governor: Emory Folmar.

Folmar is the no-nonsense mayor of Montgomery, a lean, ex-paratrooper who won a Silver Star in Korea and sometimes packs a pistol to public gatherings.

A wealthy shopping center developer, he is one of "the city's mega-rich," says businessman Mickey Griffin, 34, national political director for Wallace's presidential campaigns in 1972 and 1976. "And this campaign is gonna be the rich against the poor."

Wallace has turned the race into a no holds-barred class war that should make the runoff against Lt. Gov. George McMillan look like a Tuesday afternoon tatting society. Already, it echoes the rough, come-from-behind tactics Wallace used to beat Lt. Gov. Albert Brewer in 1970 when doctored photographs of his opponent with black men and women showed up in barbershops.

This morning, over a hearty breakfast of eggs and country ham, Wallace aides gleefully contemplated circulating a photograph of Folmar, 52, whose macho law-and-order image as mayor has earned him the nickname, "Mayatollah."

It pictures Folmar at a country club costume ball dressed in "tights, a sequined cape and crowned with a big ole hat with a plume, wearing a mask and waving a wand," says Griffin. "He's about to get a lesson in politics from the king."

Folmar expects to spend at least $1 million to overcome low name recognition and become the first Republican governor since 1872. Wallace has raised $1.2 million.

"His Folmar's slogan is, 'Let's Get Alabama Working,' " says Griffin. "But he's with the party that put us out of work. Gov. Wallace will be asking folks, 'Are you better off today or were you better off under George Wallace?' "

A gloomy 14.2 percent unemployment rate, second only to Michigan's, has set the stage for a referendum on Reaganomics, say political analysts. Wallace scratched out his slim, 19,000-vote victory Tuesday with 51 percent to McMillan's 49 percent by touting his name and reputation as a means of luring industry and jobs into the state.

He drew well enough among laid-off steelworkers, blue collar workers and rural blacks to offset McMillan's surge in the cities such as Birmingham. That a former segregationist was kept alive politically by the same blacks he once blocked at the schoolhouse door dismayed black civil rights leaders who campaigned against him.

But such ironies reflect the profound changes in Alabama's racial and political attitudes in the last two decades, and Wallace's shrewd capitalizing on them. To blacks, he conceded his past "mistakes" and many forgave him.

"He's a changed man, and he'll change again if necessary," observed one cynic, a high state Democratic Party official.

Yet Wallace won despite the heavy political baggage of his past, his physical handicap and his age, 63. He is half-deaf and paralyzed from the waist down, confined to a wheelchair since he was gunned down by a would-be assassin in 1972 while running for president. Folmar is a vigorous 52, a jogger and raquetball player whose ads are expected to plug his physical condition.

Wallace also survived a sloppy campaign organization. Folmar, by contrast, has run a crack team.

As mayor, he shut down adult bookstores in town, then shrugged off death threats. He plays tough right wing politics.

"The only thing Folmar ever saw in the middle of the road was a yellow line and a dead possum," says Griffin, serving up begrudging respect.

"Clinch up, George, I'm coming," Folmar growled at the news he would face Wallace Nov.